@webqit/oohtml 4.3.15 → 4.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -17
- package/dist/main.js +2 -2
- package/dist/main.js.map +2 -2
- package/dist/main.lite.js +4 -4
- package/dist/main.lite.js.map +2 -2
- package/dist/scoped-js.js +1 -1
- package/dist/scoped-js.js.map +2 -2
- package/package.json +2 -2
- package/src/scoped-js/index.js +2 -1
- package/test/scoped-js.test.js +1 -1
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"wicg-proposal"
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://webqit.io/tooling/oohtml",
|
|
17
|
-
"version": "4.3.
|
|
17
|
+
"version": "4.3.16",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"postpublish": "git push && git push --tags"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@webqit/quantum-js": "^4.5.
|
|
42
|
+
"@webqit/quantum-js": "^4.5.27",
|
|
43
43
|
"@webqit/realdom": "^2.1.33",
|
|
44
44
|
"@webqit/util": "^0.8.11"
|
|
45
45
|
},
|
package/src/scoped-js/index.js
CHANGED
|
@@ -91,12 +91,13 @@ async function execute( config, execHash ) {
|
|
|
91
91
|
* @return Void
|
|
92
92
|
*/
|
|
93
93
|
function realtime( config ) {
|
|
94
|
+
const inBrowser = Object.getOwnPropertyDescriptor( globalThis, 'window' )?.get?.toString().includes( '[native code]' ) ?? false;
|
|
94
95
|
const window = this, { webqit: { oohtml, realdom } } = window;
|
|
95
96
|
if ( !window.HTMLScriptElement.supports ) { window.HTMLScriptElement.supports = type => [ 'text/javascript', 'application/javascript' ].includes( type ); }
|
|
96
97
|
const handled = new WeakSet;
|
|
97
98
|
realdom.realtime( window.document ).query( config.scriptSelector, record => {
|
|
98
99
|
record.entrants.forEach( script => {
|
|
99
|
-
if ( handled.has( script ) ) return;
|
|
100
|
+
if ( handled.has( script ) || (!inBrowser && !script.hasAttribute('ssr')) ) return;
|
|
100
101
|
// Do compilation
|
|
101
102
|
const compiledScript = compileScript.call( window, config, script );
|
|
102
103
|
if ( !compiledScript ) return;
|
package/test/scoped-js.test.js
CHANGED