Comparing version 0.0.11 to 0.0.12
13
azdom.js
@@ -16,4 +16,4 @@ import { randGen } from '/node_modules/jsstrgen/jsstrgen.js'; | ||
* The ui function is a helper function that takes 3 arguments, `componentClass`, | ||
* `domElement`, `options` (optional, defaults to {}), and `init` (optional, defaults to false) | ||
* and returns a cached representation of the ui component managed by the `componentClass`. | ||
* `domElement`, and `options` (optional, defaults to null), and returns a cached | ||
* representation of the ui component managed by the `componentClass`. | ||
* | ||
@@ -35,5 +35,5 @@ * It is common for the same `domElement` to be managed by multiple `componentClass`es. | ||
* initialization. The `options` could be anything that will be comsumed by the `azInit` of the | ||
* `componentClass`, {} by default. | ||
* `componentClass`, null by default. | ||
*/ | ||
az.ui = (componentClass, domElement, options = {}) => { | ||
az.ui = (componentClass, domElement, options = null) => { | ||
const node = resolveDOM(null, domElement); | ||
@@ -44,4 +44,3 @@ let objId = node.getAttribute('azdom-' + componentClass.name); | ||
if (componentObject) { | ||
typeof componentObject.azInit === 'function' && componentObject.azInit(options); | ||
objCache[objId] = componentObject; | ||
typeof componentObject.azInit === 'function' && options && componentObject.azInit(options); | ||
return componentObject; | ||
@@ -56,5 +55,5 @@ } | ||
node.classList.add('azui'); | ||
typeof componentObject.azInit === 'function' && componentObject.azInit(options); | ||
typeof componentObject.azInit === 'function' && options && componentObject.azInit(options); | ||
objCache[objId] = componentObject; | ||
return componentObject; | ||
}; |
{ | ||
"name": "azdom", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "A DOM manager library.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17997
489