@jeefo/component
Advanced tools
Comparing version 0.0.13 to 0.0.14
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : renderable_component.js | ||
* Created at : 2019-06-26 | ||
* Updated at : 2020-10-23 | ||
* Updated at : 2020-11-23 | ||
* Author : jeefo | ||
@@ -147,3 +147,3 @@ * Purpose : | ||
// DEBUG_END | ||
const { $element, parent, children } = this; | ||
const {$element, parent, children} = this; | ||
@@ -153,5 +153,3 @@ array_remove(parent.children, this); | ||
for (const directive of this.directives) { | ||
await directive.destroy(); | ||
} | ||
for (const directive of this.directives) directive.destroy(); | ||
await super.destroy(); | ||
@@ -161,5 +159,3 @@ $element.remove(); | ||
let i = children.length; | ||
while (i--) { | ||
children[i].destroy(); | ||
} | ||
while (i--) children[i].destroy(); | ||
} | ||
@@ -166,0 +162,0 @@ |
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : structure_component.js | ||
* Created at : 2019-06-26 | ||
* Updated at : 2020-10-23 | ||
* Updated at : 2020-11-23 | ||
* Author : jeefo | ||
@@ -19,2 +19,3 @@ * Purpose : | ||
const jqlite = require("@jeefo/jqlite"); | ||
const Observer = require("@jeefo/observer"); | ||
const IComponent = require("../interfaces/i_component"); | ||
@@ -40,3 +41,3 @@ const array_remove = require("@jeefo/utils/array/remove"); | ||
if (this.is_initialized) { | ||
console.log("IStructure initialize called more than once"); | ||
console.log("StructureComponent initialize called more than once"); | ||
} | ||
@@ -52,8 +53,17 @@ // DEBUG_END | ||
if (this.is_destroyed) { | ||
console.log("IStructure destroy called more than once."); | ||
console.log("StructureComponent destroy called more than once."); | ||
} | ||
// DEBUG_END | ||
for (const child of this.children) await child.destroy(); | ||
array_remove(this.parent.children, this); | ||
const {controller, parent, children} = this; | ||
array_remove(parent.children, this); | ||
this.is_destroyed = true; | ||
for (const directive of this.directives) directive.destroy(); | ||
if (typeof controller.on_destroy === "function") { | ||
await controller.on_destroy(); | ||
} | ||
Observer.destroy(controller); | ||
let i = children.length; | ||
while (i--) children[i].destroy(); | ||
} | ||
@@ -60,0 +70,0 @@ |
{ | ||
"name": "@jeefo/component", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"homepage": "https://github.com/je3f0o/jeefo_component", | ||
@@ -5,0 +5,0 @@ "copyright": "2019", |
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
102567
2875