DomAccess.addScript() and DomAccess.loadScript() currently provide similar functionality but with different implementations and use cases.
addScript is exposed as a remote method, while loadScript is a local helper used by addons.
We should merge these into a single, robust API that:
- Supports both remote and local usage.
- Handles both adding the tag and tracking loading state (Promise-based).
- Standardizes the configuration object.
This is a technical debt cleanup task.
DomAccess.addScript()andDomAccess.loadScript()currently provide similar functionality but with different implementations and use cases.addScriptis exposed as a remote method, whileloadScriptis a local helper used by addons.We should merge these into a single, robust API that:
This is a technical debt cleanup task.