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
For microapplication concept it is crucial to have an embedded script serving and accessing the content directly around the script without the need to identify the surrounding DOM. I.e. ability to traverse DOM starting from current script. The way around like dom identified with ID unfortunately is not universal as it could be multiple microapplications ( including same type ) presented on same host page. The dom insulation is not always applicable as scope=none disables insulation.
The cause of currentScript is not defined is in dynamic script loading. Under standard only scripts which are part of initial HTML will be given document.curentScript set.
The text was updated successfully, but these errors were encountered:
Work around: plug-in to module loader (xhr/workers/etc) and define the alternative variable in document scope. document.currentModule with SCRIPT object, for ES6 modules the parentNode would refer to parent module, question is how to associate the instance and module since the actual use is to get the HtmlElement instance reference from module. I.e. get current script or ownerElement in order to access other elements within shadowDom.
For microapplication concept it is crucial to have an embedded script serving and accessing the content directly around the script without the need to identify the surrounding DOM. I.e. ability to traverse DOM starting from current script. The way around like dom identified with ID unfortunately is not universal as it could be multiple microapplications ( including same type ) presented on same host page. The dom insulation is not always applicable as scope=none disables insulation.
The cause of currentScript is not defined is in dynamic script loading. Under standard only scripts which are part of initial HTML will be given document.curentScript set.
The text was updated successfully, but these errors were encountered: