fixed refacto of this.buildosUrl
This commit is contained in:
@@ -12,9 +12,17 @@
|
||||
*/
|
||||
|
||||
class Buildoz extends HTMLElement {
|
||||
|
||||
// static is evaluated when the class is defined, therefore while buildoz.js is executing.
|
||||
// therefore document.currentScript refers to buildoz.js (but not later!!)
|
||||
static _buildozUrl = document.currentScript?.src ?? ''
|
||||
|
||||
constructor(){
|
||||
super() // always call super() first!
|
||||
this.attrs = {}
|
||||
|
||||
// Usefull for relative dependencies, to keep lib fully portable
|
||||
this.buildozUrl = Buildoz._buildozUrl // was defined in the past
|
||||
}
|
||||
|
||||
static get observedAttributes(){ //observable attributes triggering attributeChangedCallback
|
||||
|
||||
Reference in New Issue
Block a user