vexflow
vexflow copied to clipboard
Use EasyScore with a ShadowRoot element
Hi! I'm interested in using the EasyScore API to a <div> element inside a ShadowRoot. Right now, this doesn't appear possible because the Factory takes in just an elementId, and the underlying code uses document.getElementById(elementId) to create the Renderer.
I tested creating a Renderer following the native API and passing it in the Factory constructor, but that seems to result in an extra blank svg area being created.
I'd be interested in trying to modify the code such that using ShadowRoot elements with EasyScore is also possible, whether that be by passing the actual element or passing in what scope the Renderer should look for the element (document versus shadowRoot). However, I noticed that the Factory, which includes the elementId gets passed around quite a bit, and wanted to ask those with more context how complicated a change like this might be.