pawajs 1.4.27 → 1.4.29

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.
package/CHANGELOG.md CHANGED
@@ -12,4 +12,5 @@ CHANGELOG.md
12
12
  + version 1.4.23 fixed _context from production
13
13
  + version 1.4.24 - add HMR mapping
14
14
  + version 1.4.26 - fixed key getcomment id
15
- + version 1.4.27 - fixed __pawaDev Tools
15
+ + version 1.4.27 - fixed __pawaDev Tools,
16
+ + version 1.4.28 - fixed pawaElement checkStaticsContext
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawajs",
3
- "version": "1.4.27",
3
+ "version": "1.4.29",
4
4
  "type":"module",
5
5
  "description": "pawajs library (reactive web runtime) for easily building web ui, enhancing html element, micro frontend etc ",
6
6
  "main": "index.js",
package/pawaElement.js CHANGED
@@ -13,13 +13,13 @@ export class PawaElement {
13
13
  */
14
14
  constructor(element,context) {
15
15
  this.#context=context
16
- const div=document.createElement('div'); div.appendChild(element.cloneNode(true))
16
+ const div=element.cloneNode(true)
17
17
  Object.assign(this, {
18
18
  _resetEffects: new Set(), _context: context, _avoidPawaRender: element.hasAttribute('pawa-avoid'),
19
19
  _el: element, _out: false, _stateContext: null, _terminateEffects: new Set(), _deleteEffects: this.terminateEffects,
20
20
  _slots: document.createDocumentFragment(), _mainAttribute: {}, _preRenderAvoid: [], _running: false,
21
21
  _hasForOrIf: this.hasForOrIf, _elementContent: element.textContent, _textContent: {}, _attributes: [],
22
- _template: div.innerHTML, _exitAnimation: null, _component: null, _unMountFunctions: [], _MountFunctions: [],
22
+ _template: div.outerHTML, _exitAnimation: null, _component: null, _unMountFunctions: [], _MountFunctions: [],
23
23
  _elementType: '', _getNode: this.getNode, _componentOrTemplate: false, _props: {}, _isView: null,
24
24
  _isElementComponent: false, _pawaAttribute: {}, _setUnMount: this.setUnMounts, _componentName: '',
25
25
  _attrElement: this.getNewElementByRemovingAttr, _attr: {}, _staticContext: [], _checkStatic: this.reCheckStaticContext,
@@ -150,7 +150,7 @@ export class PawaElement {
150
150
  })
151
151
  }
152
152
  reCheckStaticContext(){
153
- const context=this.context
153
+ const context=this._context
154
154
  if (this._staticContext.length > 0) {
155
155
  for (const [key,value] of Object.entries(context)) {
156
156
  if (this._staticContext.includes(key)) {