Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Add workaround for Safari 9 Support #527

Merged
merged 2 commits into from
May 24, 2017

Conversation

ilankham
Copy link
Contributor

This pull request is intended to resolve issue #520 by adding a workaround for Safari 9's lack of implementation for TypedArray.prototype.slice(), per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice

Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

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

LGTM (though linter might complain)

if (!Uint8Array.prototype.slice) {
Object.defineProperty(Uint8Array.prototype, 'slice', {
value: Array.prototype.slice
});
Copy link
Contributor

Choose a reason for hiding this comment

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

The linter might complain about this semicolon (I don't think we have them elsewhere.

@glasnt
Copy link
Member

glasnt commented May 24, 2017

@ilankham I've committed a linting fix to this PR, including an ignore for the native extension (that is the point of this PR)
I'll merge once it runs green

@glasnt glasnt merged commit d957318 into beeware:master May 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants