Sasha Firsov
Sasha Firsov
Each top level function( assuming it is not dynamically changed variable ) need to be surrounded by wrapper in each scope only once. * In callee (function declaration) scope wrapping...
**embed-page.loadCount** The SCRIPT once added to DOM, is not going to be removed from execution even if removed or its content cleared. Which given the difficulties if `embed-page` content changed...
**Scripts inlining** The `none` scope assumes no insulation but each microapplication could expect the `module` script execution at least once in their life cycle which conflicts with container behavior where...
**`document.currentScript`** Browser has given current script access only for non-module type of script. Which excludes the use of modern ES6 modular dependencies in content-aware scripts. `embed-page` breaks this pattern by...
**Performance issues due to unified variables treatment** While in rev 0.0.20 the global variables defined in script and in event attribute level are handled more or less properly, the implementation...
To make global variables sync more efficient: - extract global vars from [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) into separate buckets ( per script or event attribute ): * const, * let, * var, *...
**Variables handling sequence** 0. sanitize `epa.globals_removable` from `epa.globals` 1. load HTML 2. extract globals from DOM by `id="XXX"` into `epa.globals` & `epa.globals_removable` 3. extract event `onXXX` event handlers from DOM...
**Import vars as globals** In many cases the import with variables is sufficient to identify APIs meant to be used in global scope. They are treated in particular script in...
**Globals in event handlers** Undeclared variables assignment is popular case: `onclick="isClicked=true"` It means the body of event handler should be scanned in same fashion for globals as SCRIPT content. By...
https://github.com/whatwg/html/issues/1013 states the interest for currentScript availability in shadowDom.