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
This feature would also be useful in many scenarios where the inline contents must be distinguished and selected by another script.
So, thinking in a broader approach, an option to enable the generation of the inline files with a data- attribute, such as data-inliner-name.
From this:
<script>
<!-- pdf.worker.js content goes here -->
</script>
To this:
<scriptdata-inliner-name="pdf.worker.js">
<!-- pdf.worker.js content goes here -->
</script>
My example scenario:
in order to specify a Service Worker for the mozilla/pdf-js library, a path or blob url should be provided. To create this blob url, we need to get the inline content and convert it (inspired by this gist).
<scriptdata-inliner-name="pdf.worker.js">
<!-- pdf.worker.js content goes here -->
</script><script>varworkerSrc=document.querySelector('[data-inliner-name="pdf.worker.js"]').textContentvarblob=newBlob([workerSrc],{type: "text/javascript"});PDFJS.workerSrc=window.URL.createObjectURL(blob);</script>
Currently, this task must be done manually, but it seems useful enough to be implemented to this project. :)
This way you can track down why what style was sources from which link.
The text was updated successfully, but these errors were encountered: