|
|
@ -2,16 +2,37 @@ |
|
|
|
* Wenity := Web Trinity |
|
|
|
*/ |
|
|
|
class WebTrinity { |
|
|
|
/** |
|
|
|
* @deprecated renamed - use copext instead |
|
|
|
* @type {HTMLElement|Component|string} = compext, for a migration period |
|
|
|
*/ |
|
|
|
html; |
|
|
|
|
|
|
|
/** |
|
|
|
* @deprecated renamed - use scripts instead |
|
|
|
* @type {HTMLStyleElement|Map<ExtStorageType, Array<SStoreDefinition>} = scripts, for a migration period |
|
|
|
*/ |
|
|
|
js; |
|
|
|
|
|
|
|
/** |
|
|
|
* @deprecated renamed - use stylings instead |
|
|
|
* @type {HTMLScriptElement|Array<SStoreDefinition>} = stylings, for a migration period |
|
|
|
*/ |
|
|
|
css; |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param {HTMLElement|Component} html |
|
|
|
* @param {HTMLStyleElement|Map<ExtStorageType, Array<SStoreDefinition>} js |
|
|
|
* @param {HTMLScriptElement|Array<SStoreDefinition>} css |
|
|
|
* @param {HTMLElement|Component|string} compext := Component Text |
|
|
|
* @param {HTMLStyleElement|Map<ExtStorageType, Array<SStoreDefinition>} scripts |
|
|
|
* @param {HTMLScriptElement|Array<SStoreDefinition>} stylings |
|
|
|
*/ |
|
|
|
constructor(html = null, js = null, css = null) { |
|
|
|
this.html = html; |
|
|
|
this.js = js; |
|
|
|
this.css = css; |
|
|
|
constructor(compext = null, scripts = null, stylings = null) { |
|
|
|
this.compext = compext; |
|
|
|
this.html = compext; |
|
|
|
this.scripts = scripts; |
|
|
|
this.js = scripts; |
|
|
|
this.stylings = stylings; |
|
|
|
this.css = stylings; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -19,7 +40,10 @@ class WebTrinity { |
|
|
|
* @returns {boolean} |
|
|
|
*/ |
|
|
|
isSSEmpty() { |
|
|
|
return (this.js === null || this.js.length === 0) |
|
|
|
return (this.scripts === null || this.scripts.length === 0) |
|
|
|
&& (this.stylings === null || this.stylings.size === 0) |
|
|
|
/* LEGACY CHECK */ |
|
|
|
&& (this.js === null || this.js.length === 0) |
|
|
|
&& (this.css === null || this.css.size === 0); |
|
|
|
} |
|
|
|
} |
|
|
|