diff --git a/packages/block-editor/src/hooks/contrast-checker.js b/packages/block-editor/src/hooks/contrast-checker.js index 1ed99511dadbf..5468b0a5bb1ee 100644 --- a/packages/block-editor/src/hooks/contrast-checker.js +++ b/packages/block-editor/src/hooks/contrast-checker.js @@ -49,7 +49,7 @@ function detectColors( blockEl ) { function createStyleObserver( node, callback ) { // Watch for changes to style-related attributes - const observer = new MutationObserver( ( mutations ) => { + const observer = new window.MutationObserver( ( mutations ) => { const hasStyleChanges = mutations.some( ( mutation ) => mutation.attributeName === 'style' );