Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Don't expose webkit prefixed MutationObserver as stable
Browse files Browse the repository at this point in the history
Older prefixed versions have known issues like not generating
mutation records on initial parse.
  • Loading branch information
josh committed Jan 22, 2014
1 parent 34a7e82 commit 886fe50
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions MutationObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,6 @@

global.JsMutationObserver = JsMutationObserver;

// Provide unprefixed MutationObserver with native or JS implementation
if (!global.MutationObserver && global.WebKitMutationObserver)
global.MutationObserver = global.WebKitMutationObserver;

if (!global.MutationObserver)
global.MutationObserver = JsMutationObserver;

Expand Down

2 comments on commit 886fe50

@megawac
Copy link

@megawac megawac commented on 886fe50 Aug 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not worth checking to see if the implementation is correct?

@josh
Copy link
Contributor Author

@josh josh commented on 886fe50 Aug 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WebKitMutationObserver is broken in any case where the unprefixed MutationObserver is exposed.

It'd also be really tricky to feature detect since you'd have to wait until after domcontentloaded.

Please sign in to comment.