-
-
Notifications
You must be signed in to change notification settings - Fork 894
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
Replace hasownproperty with defineProperty #256
Comments
Can you provide a test case, or be more specific? The point of the shim is to match the spec - that link has to do with user code. There's no choice here that I can see. Also, |
Since |
well you have it on 2 different lines and you are using it 13 times with the method owns() You need to replace it with defineProperty to support ie8. http://jsfiddle.net/scubajosh/pfxP5/626/embedded/result/ since ie8 you cant edit js fiddle you have to view it in the result. here is how to edit It shows the error in your code for your owns method. HasOwnProperty isnt needed at all please check http://phrogz.net/death-to-hasownproperty for reference. |
Can you link me to a line directly? I'm pretty confident we're only referencing
That particular article is from 2012, and is quite simply incorrect when you're talking about pre-ES5 browsers. To support IE 8, we must use hasOwnProperty. |
@ljharb you are correct the problem wasn't in your code it was in exoskeleton js which I got working in ie8 now thanks. The other guys blog screwed me up, the death to has own property dude had no idea what he was talking about. MSDN Docs state that hasownproperty worked since ie6 and is not available in host object for ie8 and below. Thanks for your help on this much appreciated. |
Thanks, glad to hear I'm not crazy :-) |
Sorry to keep this one going but I'm getting an error thrown in ie8 at /~https://github.com/es-shims/es5-shim/blob/master/es5-sham.js#L31. "Object doesn't support this property or method". |
You can't use the |
I run into the same problem @opsb was seeing (line 31 "Object doesn't support this property or method".) I don't see this issue when I include both the |
@blimmer if by the "same problem" you mean with ember-cli or exoskeleton, then no, that's not an issue with this shim. You should not need However, you can't use the |
I'm not referring to an issue with Ember.JS, though this is how I originally saw the error. I see the <!DOCTYPE html>
<html>
<head>
<script src='es5-sham.js'></script>
</head>
<body>
<h1>Hello World</h1>
</body>
</html> So, as you mentioned before, IE8 requires inclusion of |
Ah, gotcha! I'll do that, thanks. |
HasownProperty fails in ie8 and isn't the point of this shim to get browsers without es5 to work they pretty much all have it, except for ie8.
Here is my reference.
http://phrogz.net/death-to-hasownproperty
The text was updated successfully, but these errors were encountered: