@microsoft/fast-html 1.0.0-alpha.37 → 1.0.0-alpha.39

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.
@@ -45,6 +45,10 @@ async function waitForAncestorHydration(element) {
45
45
  */
46
46
  export function RenderableFASTElement(BaseCtor) {
47
47
  const C = class extends BaseCtor {
48
+ constructor() {
49
+ super(...arguments);
50
+ this.deferHydration = true;
51
+ }
48
52
  /**
49
53
  * Prepares the element for hydration by calling the user-defined prepare method
50
54
  * and waiting for all ancestor elements to be hydrated.
@@ -54,14 +58,14 @@ export function RenderableFASTElement(BaseCtor) {
54
58
  async _prepare() {
55
59
  if (this.prepare) {
56
60
  await this.prepare();
61
+ this.prepare = undefined;
57
62
  }
58
63
  await waitForAncestorHydration(this);
59
64
  this.deferHydration = false;
60
65
  }
61
- constructor(...args) {
62
- super(...args);
63
- this.deferHydration = true;
64
- void this._prepare();
66
+ connectedCallback() {
67
+ this._prepare();
68
+ super.connectedCallback();
65
69
  }
66
70
  };
67
71
  attr({ mode: "boolean", attribute: deferHydrationAttribute })(C.prototype, "deferHydration");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/fast-html",
3
- "version": "1.0.0-alpha.37",
3
+ "version": "1.0.0-alpha.39",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Microsoft",
@@ -58,10 +58,10 @@
58
58
  "./dist/esm/index.js"
59
59
  ],
60
60
  "peerDependencies": {
61
- "@microsoft/fast-element": "^2.9.2"
61
+ "@microsoft/fast-element": "^2.10.2"
62
62
  },
63
63
  "devDependencies": {
64
- "@microsoft/fast-element": "^2.9.2"
64
+ "@microsoft/fast-element": "^2.10.2"
65
65
  },
66
66
  "beachball": {
67
67
  "disallowedChangeTypes": [