Hello,
I forked the repo about this, and just wanted to have your opinion on this before testing and proposing it :
https://github.com/mlbli/zepto/commit/8b140fd80e9a31b66832a9405a2c5907361571f3
The main goal of this part is to preserve prototypal inheritance with Zepto objects in IE :
On a "modern" browser :
var doc = $(document)
doc.foo // undefined
$.fn.foo = "bar"
doc.foo // "bar"
With $.extend(dom, $.fn) in IE:
var doc = $(document)
doc.foo // undefined
$.fn.foo = "bar"
doc.foo // undefined
The main bottleneck is that it uses another context for execution (via an iframe), so isArray mush use {}.toString instead of instanceof. Positive point though, isZ in IE can now use isPrototypeOf.
Thanks!
Hello,
I forked the repo about this, and just wanted to have your opinion on this before testing and proposing it :
https://github.com/mlbli/zepto/commit/8b140fd80e9a31b66832a9405a2c5907361571f3
The main goal of this part is to preserve prototypal inheritance with Zepto objects in IE :
On a "modern" browser :
With
$.extend(dom, $.fn)in IE:The main bottleneck is that it uses another context for execution (via an iframe), so
isArraymush use{}.toStringinstead ofinstanceof. Positive point though,isZin IE can now useisPrototypeOf.Thanks!