asap icon indicating copy to clipboard operation
asap copied to clipboard

asap uses timer, not MutationObserver, in Safari

Open miedmondson opened this issue 9 years ago • 1 comments

asap does not use makeRequestCallFromMutationObserver because if (typeof BrowserMutationObserver === "function") fails: typeof MutationObserver returns "object" in Safari (observed in versions 7-9).

Object.prototype.toString.call(MutationObserver) returns "[object MutationObserverConstructor]".

miedmondson avatar Sep 04 '15 23:09 miedmondson

Knowing that host/native constructors have sometimes typeof equal to "object", in P the check of existence of a constructor consists in typeof x === "function || typeof y === "object". I suggest to do similarly here.

rkatic avatar Sep 10 '15 13:09 rkatic