pawajs 2.0.6 → 2.0.7

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 (2) hide show
  1. package/package.json +1 -1
  2. package/pawaElement.js +13 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawajs",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "type":"module",
5
5
  "description": "pawajs library (reactive web runtime) for easily building web ui, enhancing html element, micro frontend, spa etc ",
6
6
  "main": "index.js",
package/pawaElement.js CHANGED
@@ -19,6 +19,19 @@ export class PawaElement {
19
19
  constructor(element,context) {
20
20
  this.#context=context
21
21
  this.#el=element
22
+ // ── Bind every method that touches private fields ──
23
+ this.getChildrenTree = this.getChildrenTree.bind(this)
24
+ this.checkLazy = this.checkLazy.bind(this)
25
+ this.safeEval = this.safeEval.bind(this)
26
+ this.setPawaAttr = this.setPawaAttr.bind(this)
27
+ this.findPawaAttribute = this.findPawaAttribute.bind(this)
28
+ this.getNewElementByRemovingAttr = this.getNewElementByRemovingAttr.bind(this)
29
+ this.remove = this.remove.bind(this)
30
+ this.unMount = this.unMount.bind(this)
31
+ this.elementType = this.elementType.bind(this)
32
+ this.setProps = this.setProps.bind(this)
33
+ this.clearContext = this.clearContext.bind(this)
34
+ // ───────────────────────────────────────────
22
35
  const div=element.cloneNode(true)
23
36
  Object.assign(this, {
24
37
  _resetEffects: new Set(), _context: context, _avoidPawaRender: element.hasAttribute('pawa-avoid'),