phoenix_live_view 0.17.12 → 0.17.14

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.
@@ -351,7 +351,7 @@ export default class LiveSocket {
351
351
  let view = this.newRootView(rootEl)
352
352
  view.setHref(this.getHref())
353
353
  view.join()
354
- if(rootEl.getAttribute(PHX_MAIN)){ this.main = view }
354
+ if(rootEl.hasAttribute(PHX_MAIN)){ this.main = view }
355
355
  }
356
356
  rootsFound = true
357
357
  })
@@ -119,7 +119,7 @@ export default class View {
119
119
  this.href = href
120
120
  }
121
121
 
122
- isMain(){ return this.el.getAttribute(PHX_MAIN) !== null }
122
+ isMain(){ return this.el.hasAttribute(PHX_MAIN) }
123
123
 
124
124
  connectParams(){
125
125
  let params = this.liveSocket.params(this.el)
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "phoenix_live_view",
3
+ "version": "0.17.14",
4
+ "description": "The Phoenix LiveView JavaScript client.",
5
+ "license": "MIT",
6
+ "repository": {},
7
+ "scripts": {
8
+ "test": "jest",
9
+ "test.coverage": "jest --coverage",
10
+ "test.watch": "jest --watch"
11
+ },
12
+ "dependencies": {
13
+ "morphdom": "2.6.1"
14
+ },
15
+ "devDependencies": {
16
+ "@babel/cli": "7.14.3",
17
+ "@babel/core": "7.14.3",
18
+ "@babel/preset-env": "7.14.2",
19
+ "eslint": "7.27.0",
20
+ "eslint-plugin-jest": "24.3.6",
21
+ "jest": "^27.0.1",
22
+ "phoenix": "1.5.9"
23
+ }
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phoenix_live_view",
3
- "version": "0.17.12",
3
+ "version": "0.17.14",
4
4
  "description": "The Phoenix LiveView JavaScript client.",
5
5
  "license": "MIT",
6
6
  "module": "./priv/static/phoenix_live_view.esm.js",
@@ -2224,7 +2224,7 @@ var View = class {
2224
2224
  this.href = href;
2225
2225
  }
2226
2226
  isMain() {
2227
- return this.el.getAttribute(PHX_MAIN) !== null;
2227
+ return this.el.hasAttribute(PHX_MAIN);
2228
2228
  }
2229
2229
  connectParams() {
2230
2230
  let params = this.liveSocket.params(this.el);
@@ -3402,7 +3402,7 @@ var LiveSocket = class {
3402
3402
  let view = this.newRootView(rootEl);
3403
3403
  view.setHref(this.getHref());
3404
3404
  view.join();
3405
- if (rootEl.getAttribute(PHX_MAIN)) {
3405
+ if (rootEl.hasAttribute(PHX_MAIN)) {
3406
3406
  this.main = view;
3407
3407
  }
3408
3408
  }