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

Add information about patching order when using ES compatibility shim… #379

Merged
merged 1 commit into from
Jan 26, 2016

Conversation

Xotic750
Copy link
Contributor

…s, along with an example. #377

```html
<script src="es5-shim.js"></script>
<script src="es5-sham.js"></script>
<script src="json3.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't even think this is necessary, but it should still be done after all the other es shims.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As json3 is ECMA5.1, then it seems correct to go after es5-shim, I believe es6-shim also patches the ECMA5.1 JSON object, which won't happen if it were after all the es shims?

https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js#L3668

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, if json3 is in fact ES5.1 with nothing extra then sure, why not.

we should probably link all of these to cdnjs so that the examples are copypasteable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/bestiejs/json3

Well it claims to be (unless I am mistaken), and the tests seem to prove that it is, unlike JSON2. I can add the cdn links, cdnjs and current versions?

Also related
#258
#348

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cdn links to the "latest" versions seem like the best choice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no cdnjs for es7-shim yet. And cdnjs does not have a "latest" option unfortunately (not that I could find), it's by release version.

<script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-sham.min.js"></script>
<script src="es7-shim.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this one, you'd want to use https://wzrd.in/standalone/es7-shim@latest which will autoshim

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add that.

…s, along with an example. es-shims#377

Add cdnjs links for latest available versions

Add ed7-shim url and update es5-shim version
@ljharb ljharb merged commit d9dc203 into es-shims:master Jan 26, 2016
@ljharb
Copy link
Member

ljharb commented Jan 26, 2016

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants