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

IE10 and others: DataView missing prototypes and getters #385

Open
Xotic750 opened this issue Dec 13, 2015 · 5 comments
Open

IE10 and others: DataView missing prototypes and getters #385

Xotic750 opened this issue Dec 13, 2015 · 5 comments

Comments

@Xotic750
Copy link
Contributor

IE10's DataView does not appear to be ES6 compliant. It's listed as being compatible on MDN.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/byteOffset

try {
    console.log(DataView.prototype.buffer);
} catch (e) {
    console.log(e);
}
try {
    console.log(DataView.prototype.byteLength);
} catch (e) {
    console.log(e);
}
try {
    console.log(DataView.prototype.byteOffset);
} catch (e) {
    console.log(e);
}
var a = Object.getPrototypeOf(new DataView(new ArrayBuffer(4)));
console.log(a);
var x = Object.getOwnPropertyDescriptor(a, 'byteLength').get;
console.log(x);
console.log(x.call(new DataView(new ArrayBuffer(4))));

http://jsfiddle.net/Xotic750/08zng894/3/

@Xotic750
Copy link
Contributor Author

Opera 12.16, also listed in MDN, also seems to have similar problems.
Safari 5.1, listed in MDN, also seems the same.
Chrome 26, similar.
FireFox 15, also.

@Xotic750 Xotic750 changed the title IE10: DataView missing prototypes and getters IE10 and others: DataView missing prototypes and getters Dec 13, 2015
@ljharb
Copy link
Collaborator

ljharb commented Dec 14, 2015

Currently the es6-shim doesn't attempt to detect, patch, or implement anything relating to Typed Arrays, including ArrayBuffer and DataView.

@Xotic750
Copy link
Contributor Author

Hopefully some day though, huh?

@ljharb
Copy link
Collaborator

ljharb commented Dec 14, 2015

Possibly never - their sole use case is for performance, and you can't get that performance without native support.

@Xotic750
Copy link
Contributor Author

Hmm. This forces me to rethink my isArrayBuffer/isDataView routines. I changed them to to detect ES6 Arraybuffers (which they do just fine), and if es6-shim can't or has no plan on fixing such issues with these legacy implementations then I'm back to the "when is an ArrayBuffer not" dilemma. :/

I can't think of a simple way to fix the deficiencies anyhow.

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

2 participants