diff --git a/src/mutation_events.js b/src/mutation_events.js index 13761b2..e534196 100644 --- a/src/mutation_events.js +++ b/src/mutation_events.js @@ -1,4 +1,4 @@ -// Copyright (c) 2023, Mason Freed +// Copyright (c) 2024, Mason Freed // All rights reserved. // // This source code is licensed under the BSD-style license found in the @@ -16,10 +16,6 @@ // https://github.com/mfreed7/mutation-events-polyfill#readme (function() { - // Check if Mutation Events are supported by the browser - if ("MutationEvent" in window) { - return; - } // Only run once if (window.mutationEventsPolyfillInstalled) { return; @@ -188,5 +184,5 @@ originalRemoveEventListener.apply(this, arguments); }; - console.log('Mutation Events polyfill installed.'); + console.log(`Mutation Events polyfill installed (native feature: ${("MutationEvent" in window) ? "supported" : "not present"}).`); })(); diff --git a/test/test.html b/test/test.html index d20ecec..cc72c97 100644 --- a/test/test.html +++ b/test/test.html @@ -6,25 +6,25 @@ const testEventOrder = false; // Set to true to test the order of events - -
chrome://flags/#mutation-events
.
-+
Mutation Events are in this browser. (In Chromium, see chrome://flags/#mutation-events
.)
This test will test the .
+Case | Actual Events | Expected Events |
---|
Case | Actual Events | Expected Events |
---|