cradova 3.3.13 → 3.3.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.
package/dist/index.js CHANGED
@@ -539,7 +539,6 @@ class Page {
539
539
  this._html = template;
540
540
  this._name = name || "Document";
541
541
  this._template.setAttribute("id", "page");
542
- console.log("boohoo 1");
543
542
  }
544
543
  set errorHandler(errorHandler) {
545
544
  this._errorHandler = errorHandler;
@@ -561,6 +560,7 @@ class Page {
561
560
  return this._dropped;
562
561
  }
563
562
  async _activate() {
563
+ console.log("boohoo 1");
564
564
  if (this._dropped) {
565
565
  history.go(-1);
566
566
  return;
@@ -570,6 +570,7 @@ class Page {
570
570
  if (html instanceof HTMLElement) {
571
571
  this._template.innerHTML = "";
572
572
  this._template.appendChild(html);
573
+ console.log("boohoo 2", html);
573
574
  } else {
574
575
  throw new Error(` \u2718 Cradova err: template function for the page returned ${html} instead of html`);
575
576
  }
@@ -732,8 +733,7 @@ class RouterBoxClass {
732
733
  var RouterBox = new RouterBoxClass;
733
734
 
734
735
  class Router {
735
- BrowserRoutes(obj) {
736
- console.log("boohoo 3");
736
+ static BrowserRoutes(obj) {
737
737
  for (const path in obj) {
738
738
  let page = obj[path];
739
739
  if (typeof page === "object" && typeof page.then === "function" || typeof page === "function") {
@@ -745,6 +745,7 @@ class Router {
745
745
  RouterBox.route(path, page);
746
746
  }
747
747
  }
748
+ console.log(RouterBox.routes);
748
749
  Router._mount();
749
750
  }
750
751
  static back() {
@@ -808,7 +809,6 @@ class Router {
808
809
  }
809
810
  }
810
811
  static _mount() {
811
- console.log("boohoo 2");
812
812
  let doc = document.querySelector("[data-wrapper=app]");
813
813
  if (!doc) {
814
814
  doc = document.createElement("div");
@@ -254,7 +254,7 @@ export declare class Router {
254
254
  *
255
255
  * accepts an object containing pat and page
256
256
  */
257
- BrowserRoutes(obj: Record<string, Page | promisedPage>): void;
257
+ static BrowserRoutes(obj: Record<string, Page | promisedPage>): void;
258
258
  /**
259
259
  Go back in Navigation history
260
260
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cradova",
3
- "version": "3.3.13",
3
+ "version": "3.3.15",
4
4
  "description": "Build Powerful ⚡ Web Apps with Ease",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",