You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presentation exported to HTML and viewed in mozilla.
Expected behavior
No loading/console errors.
Actual behavior
Presentation loads, but with errors. This is especially visible with a larger presentation and a mobile browser.
Browser console output:
Uncaught DOMException: Operation is not supported
<anonymous> file:///Users/user/slides/test.html:14
w file:///Users/vdangovas/user/slides/test.html:14
w file:///Users/vdangovas/user/slides/test.html:14
<anonymous> file:///Users/user/slides/test.html:14
<anonymous> file:///Users/user/slides/[test.html:14](file:///Users/user/slides/test.html) test.html:14
<anonymous> file:///Users/user/slides/test.html:14
w file:///Users/user/slides/test.html:14
w file:///Users/user/slides/test.html:14
<anonymous> file:///Users/user/slides/test.html:14
<anonymous> file:///Users/user/slides/test.html:14
This is due to the different behavior between Firefox and Chrome when defining the Marp Core's Web Component (<marp-pre> for auto-scaling code blocks in <pre> elements) using the is attribute.
In Chrome, <pre> is already upgraded to <marp-pre> while running constructor of the custom element. <marp-pre> is allowed to attach custom element so any exceptions will not bring when attaching Shadow DOM.
However, they are browser-side errors that occurs when updating the definition of existing HTML elements, and they do not stop the main JavaScript thread due to the exception. The subsequent processes in the script (more reliable Web Component upgrade process, to deal with upgrade failures in Firefox and Safari) will be continue without any problems, so there are not any problems in rendering Marp slides.
Swap the order of processes, to run more reliable Web Component upgrade before defining Web Components. With this approach, there is a possibility that the browser will display undefined elements for a brief period until the web components are defined.
Simply catch and silence the exception. In this case, the component may be incomplete state until an explicit update process is performed.
Version of Marp Tool
marp-vscode 2.8.0
Operating System
macOS
Environment
How to reproduce
Any code block defined in presentation:
---
marp: true
---
```
```
Presentation exported to HTML and viewed in mozilla.
Expected behavior
No loading/console errors.
Actual behavior
Presentation loads, but with errors. This is especially visible with a larger presentation and a mobile browser.
Browser console output:
Line 14 is
<script>!function()[...]
Additional information
Public instance with these errors: https://vainiusd.github.io/marp-cheatslides/
The text was updated successfully, but these errors were encountered: