Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress uncaught DOMException error while upgrading <marp-pre> Web Component elements in Firefox #384

Merged
merged 3 commits into from
Sep 8, 2024

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Sep 8, 2024

Fix #370.

This error is the error brought by Firefox while upgrading web components, and that is not affected to the subsequent browser script running on JavaScript main threads. Nevertheless, supressing errors is well-mannered.

  • When updating the shadow root, we will check whether that is prepared.
  • Known error NotSupportedError in Firefox will be simply suppressed.

Suppress NotSupportedError while upgrading Web Components in Firefox.
throw new Error('Unknown error while attaching shadow')
})

expect(() => browser.applyCustomElements()).toThrow()
Copy link
Member Author

Choose a reason for hiding this comment

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

This test does not pass due to browser error that cannot catch by JS main thread.

@yhatt yhatt merged commit fd631a0 into main Sep 8, 2024
1 check passed
@yhatt yhatt deleted the suppress-firefox-not-supported-error branch September 8, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code block in HTML presentation issues Uncaught DOMException: Operation is not supported
1 participant