electron-panel
Advanced tools
Comparing version 1.2.0 to 1.2.1
## CHANGELOG | ||
### v1.2.1 | ||
- Prevent load the panel frame more than once when its src changed. | ||
### v1.2.0 | ||
@@ -4,0 +8,0 @@ |
@@ -192,2 +192,3 @@ 'use strict'; | ||
this._inited = false; | ||
this._loaded = false; | ||
} | ||
@@ -242,9 +243,16 @@ | ||
let src = this.getAttribute('src'); | ||
if ( src !== null ) { | ||
console.warn('Can not change the src if panel is loaded'); | ||
return; | ||
} | ||
if ( src !== val ) { | ||
if ( this._loaded ) { | ||
console.warn('Can not change the src if panel is loaded'); | ||
return; | ||
} | ||
this.setAttribute('src', val); | ||
// skip load the panel if it is not inited. | ||
if ( !this._inited ) { | ||
return; | ||
} | ||
this._load(val); | ||
@@ -463,2 +471,3 @@ } | ||
this._apply(panelProto); | ||
this._loaded = true; | ||
@@ -465,0 +474,0 @@ // add it to panel list |
{ | ||
"name": "electron-panel", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Manipulate panels in window for Electron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54545
1541