@webhandle/backbone-view 1.0.0 → 1.0.2

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/client-js/view.js CHANGED
@@ -96,6 +96,7 @@ export class View {
96
96
  */
97
97
  _createElement(name) {
98
98
  let el = document.createElement(name)
99
+ el.setAttribute('id', this.id)
99
100
  el.view = this
100
101
  return el
101
102
  }
@@ -108,6 +109,9 @@ export class View {
108
109
  if (!this.el) {
109
110
  this.setElement(this._createElement(this.tagName))
110
111
  }
112
+ else {
113
+ this._addListeners()
114
+ }
111
115
  this._setAttributes()
112
116
  if (this.className) {
113
117
  this.el.classList.add(this.className)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webhandle/backbone-view",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "client-js/index.js",
6
6
  "scripts": {
@@ -63,4 +63,4 @@
63
63
  "README.md"
64
64
  ],
65
65
  "type": "module"
66
- }
66
+ }