be-hive 0.0.92 → 0.0.94

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.
Files changed (3) hide show
  1. package/be-hive.js +12 -0
  2. package/be-hive.ts +11 -0
  3. package/package.json +2 -2
package/be-hive.js CHANGED
@@ -49,6 +49,18 @@ export class BeHive extends HTMLElement {
49
49
  for (const node of mutation.addedNodes) {
50
50
  this.#inspectNewNode(node);
51
51
  }
52
+ for (const node of mutation.removedNodes) {
53
+ const beEnhanced = node.beEnhanced;
54
+ if (beEnhanced === undefined)
55
+ continue;
56
+ for (const key in beEnhanced) {
57
+ const enhancement = beEnhanced[key];
58
+ const detach = enhancement['detach'];
59
+ if (typeof (detach) === 'function') {
60
+ detach(node);
61
+ }
62
+ }
63
+ }
52
64
  }
53
65
  else if (mutation.type === "attributes") {
54
66
  //console.log(`The ${mutation.attributeName} attribute was modified.`);
package/be-hive.ts CHANGED
@@ -61,6 +61,17 @@ export class BeHive extends HTMLElement{
61
61
  for(const node of mutation.addedNodes){
62
62
  this.#inspectNewNode(node);
63
63
  }
64
+ for(const node of mutation.removedNodes){
65
+ const beEnhanced = (<any>node).beEnhanced;
66
+ if(beEnhanced === undefined) continue;
67
+ for(const key in beEnhanced){
68
+ const enhancement = beEnhanced[key];
69
+ const detach = enhancement['detach'];
70
+ if(typeof(detach) === 'function'){
71
+ detach(node);
72
+ }
73
+ }
74
+ }
64
75
  } else if (mutation.type === "attributes") {
65
76
 
66
77
  //console.log(`The ${mutation.attributeName} attribute was modified.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-hive",
3
- "version": "0.0.92",
3
+ "version": "0.0.94",
4
4
  "keywords": [
5
5
  "web-components",
6
6
  "web-component",
@@ -29,7 +29,7 @@
29
29
  "safari": "npx playwright wk http://localhost:3030"
30
30
  },
31
31
  "dependencies": {
32
- "be-enhanced": "0.0.14"
32
+ "be-enhanced": "0.0.19"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@playwright/test": "1.33.0",