Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properlyBoxesContext throws when loaded after prototypejs 1.7.0.0 and older #377

Closed
gkatsev opened this issue Jan 25, 2016 · 7 comments
Closed

Comments

@gkatsev
Copy link
Contributor

gkatsev commented Jan 25, 2016

See https://jsfiddle.net/gkatsev/oesj5krb/2/ for a live example.
The runtime check ends up invoking prototypejs code and in version 1.7.0.0 and older of the library this ends up throwing an error because a method that prototypejs expects doesn't exist.
version 1.7.1.0 of prototypejs doesn't have this issue because it ends up wrapping the native methods properly in some cases.
es5-shim probably should not throw an error when in such a setting.

@Xotic750
Copy link
Contributor

I'm curious as to why you would load prototypejs before es5-shim, rather than vice-versa?

@ljharb
Copy link
Member

ljharb commented Jan 25, 2016

That was my question, but sadly it's on a customer's page that they don't control.

@Xotic750
Copy link
Contributor

Perhaps the documents should clearly state that es5-shim (es5-sham, es6-shim and es7.shim etc) are expected to be loaded first and in a particular order as they are patching the JavaScript engine, even though it seems like common sense.

@ljharb
Copy link
Member

ljharb commented Jan 25, 2016

@Xotic750 a PR to add that verbage would be just fine. Regardless, this should be fixed.

@gkatsev
Copy link
Contributor Author

gkatsev commented Jan 25, 2016

The issue at hand isn't what the correct usage of es5-shim is. It's whether es5-shim should throw an error when used in this way. It probably should not.

@ljharb ljharb closed this as completed in 9a1ea2d Jan 25, 2016
@ljharb
Copy link
Member

ljharb commented Jan 26, 2016

Published as v4.5.1

@gkatsev
Copy link
Contributor Author

gkatsev commented Jan 26, 2016

@ljharb thanks.

Xotic750 added a commit to Xotic750/es5-shim that referenced this issue Jan 26, 2016
Xotic750 added a commit to Xotic750/es5-shim that referenced this issue Jan 26, 2016
…s, along with an example. es-shims#377

Add cdnjs links for latest available versions
Xotic750 added a commit to Xotic750/es5-shim that referenced this issue Jan 26, 2016
…s, along with an example. es-shims#377

Add cdnjs links for latest available versions

Add ed7-shim url and update es5-shim version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants