wj-elements 0.0.13 → 0.0.15

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.
@@ -1500,8 +1500,9 @@ class Routerx extends WJElement {
1500
1500
  for (let i = 0; i < attributes.length; i++) {
1501
1501
  const attributeName = attributes[i].name;
1502
1502
  const attributeValue = attributes[i].value;
1503
+ console.log(attributeName, attributeValue, new URL(attributeValue, import.meta.url), import.meta.url, this.origin);
1503
1504
  if (attributeName === "component" && attributeValue.indexOf(".js") > -1) {
1504
- obj.component = () => import(new URL(attributeValue, import.meta.url).href);
1505
+ obj.component = () => import(new URL(attributeValue, this.origin || import.meta.url).href);
1505
1506
  } else {
1506
1507
  if (attributeName !== "shadow") {
1507
1508
  obj[attributeName] = attributeValue;
@@ -1522,6 +1523,7 @@ class Routerx extends WJElement {
1522
1523
  }
1523
1524
  beforeDisconnect() {
1524
1525
  this.unbindIntercept();
1526
+ this.router.destroy();
1525
1527
  }
1526
1528
  }
1527
1529
  customElements.get("wj-router") || window.customElements.define("wj-router", Routerx);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wj-elements",
3
3
  "private": false,
4
- "version": "0.0.13",
4
+ "version": "0.0.15",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "./dist"