I'd like to use the technique described here to have web workers in a component without having to handle additional files.
However, adding another <script>
element seems not to work:
- it I add it before the component's script part it doesn't get recognized/found by
document.querySelector
- if I add it after the component's script part, the component doesn't compile
The only solutions I've found are:
- source in a multiline string: ugly, messes up the editor
- script inside the template: even uglier, exposes innards
Any better solution out there?