Closed mikaelkaron closed 11 years ago
Hey @mikaelkaron,
I was hesitant to add partial support for IE8's dom-only defineProperty functionality since I thought it would confuse devs. However, I've thought of many uses for it lately so I'm definitely interested. :) Thanks for digging in to this!
I think we need a new has() test that is specifically for dom objects ("object-definepropertyfordom" or something even more silly). We could use a function test instead of an existence test like you've done here. We could then sniff for dom nodes inside the Object.defineProperty shim. That seems like it would work.
-- John
just updated the pull request, @unscriptable would you pls take a look at 3318ef5, we refactored the code and added 'has() check' you mentioned above.
This code looks great. Thanks guys! I have a few questions inline...
updated,
now the 'feature testing' checks both dom object and javascript literal object, return true if the dom object works but javascript literal object fail.
btw, !has('object-defineproperty')
should always return false in IE8
Thanks @normanzb, I can work with this.
Hey @normanzb and @mikaelkaron,
What browser versions are you targeting? We're thinking about dropping support for IE6&7 as well as Firefox 3.6--4 and Safari 5.0.
Feedback appreciated!
-- John
@unscriptable, sorry i just realise you asked the question 1 year ago, I believe some of @mikaelkaron 's project still need to be compatible with IE7.
Maybe we can move them into a separated file? so for who is interested in older browser support they can pick up the file?
Note that this does not even try to use a fallback when this is used on a dom element