You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No replacement. FAST now uses a single shared kernel contract, and multiple FAST versions on the same page are unsupported.
Migration steps
Remove any runtime checks that read FAST.versions.
Fix duplicate FAST installs in your bundler or dependency graph instead of relying on version tracking at runtime.
Remove any fast-kernel script attributes. They no longer affect FAST initialization.
Native globalThis requirement (v2 → v3)
Changed behavior
Native globalThis required: @microsoft/fast-element no longer installs
a globalThis polyfill as a side effect. The package only keeps the
requestIdleCallback / cancelIdleCallback fallback for environments that
still lack those APIs.
Migration steps
Verify that the browsers and JS runtimes you support provide native
globalThis.
If you still target an older runtime without globalThis, load that
polyfill before importing @microsoft/fast-element.
Declarative HTML moved into fast-element (v3)
Declarative HTML APIs now ship from @microsoft/fast-element instead of the
removed @microsoft/fast-html package.
Import changes
Before
After
@microsoft/fast-html
@microsoft/fast-element/declarative.js
@microsoft/fast-html/utilities.js
@microsoft/fast-element/declarative/utilities.js
Migration steps
Update declarative runtime imports to
@microsoft/fast-element/declarative.js.
Update declarative utility imports such as deepMerge to
@microsoft/fast-element/declarative/utilities.js.
Import core FAST Element helpers from focused entrypoints such as
@microsoft/fast-element/attr.js,
@microsoft/fast-element/observable.js, and
@microsoft/fast-element/template.js. The root
@microsoft/fast-element export now only provides FASTElement.
Keep declarative APIs on @microsoft/fast-element/declarative.js; they are
still separate from the root export surface.
Export path cleanup (v3)
Optional binding helpers remain on their dedicated public sub-entrypoints, and
hydration utilities now live on @microsoft/fast-element/hydration.js:
Move attr, observable, html, css, and other helpers off the root
@microsoft/fast-element barrel onto focused subpaths.
Replace @microsoft/fast-element/element-hydration.js with
@microsoft/fast-element/hydration.js.
Remove any direct imports from metadata.js, testing.js,
pending-task.js, install-element-hydration.js, or
install-hydratable-view-templates.js.
Keep optional binding helpers on their dedicated binding/* subpaths.
Declarative event handler e removal (v3)
Removed behavior
Removed
Replacement
Bare e event arguments in declarative event handlers
$e
TemplateParser.hasDeprecatedEventSyntax
No replacement
Only $e and $c are reserved event handler arguments in declarative
templates. Bare e now resolves like any other binding path on the current
data source.
Migration steps
Replace declarative event bindings such as
@click="{handleClick(e)}" with @click="{handleClick($e)}".
Remove any TemplateParser.hasDeprecatedEventSyntax checks or warnings from
custom tooling.
Prerendered Content Optimization (v2 → v3)
Removed exports
Export
Replacement
HydratableElementController
ElementController (prerendered path built in)
HydrationControllerCallbacks
ElementHydrationCallbacks via ElementController.configHydration()
needsHydrationAttribute
ElementController.isPrerendered
deferHydrationAttribute
Template-pending guard in ElementController.connect()
No replacement needed — ViewTemplate.hydrate() is built into the template runtime
@microsoft/fast-element/declarative.js still exposes declarative-only APIs,
but it no longer patches hydration behavior through installer side effects.
Changed behavior
attributeChangedCallback during upgrade: When isPrerendered is true and the element has not yet connected, attribute change callbacks are suppressed. After connection, all attribute changes are processed normally.
connect() with deferred template: When templateOptions is "defer-and-hydrate" and no template is available, connect() returns early automatically. The Observable subscription on "template" retriggers connection when the template arrives. No defer-hydration attribute is needed.
Binding evaluation with existing shadow root: When an existing shadow root is detected, attribute and booleanAttribute bindings skip their initial DOM update. All other binding types (event, content, property, tokenList) run normally.
New APIs
ElementController.isPrerendered (Promise<boolean>): Resolves to true after prerendered content has been hydrated, or false when the component is client-side rendered. Component authors can await this to know when the element is fully interactive.
ViewController.isPrerendered (Promise<boolean> | undefined): Available to custom directives. Resolves to true when the view's content was prerendered, false otherwise.
Remove import "@microsoft/fast-element/install-element-hydration.js" and
import "@microsoft/fast-element/install-hydratable-view-templates.js"
side-effect imports.
Replace element.$fastController instanceof HydratableElementController checks with await element.$fastController.isPrerendered.
Remove defer-hydration and needs-hydration attributes from server-rendered markup.
Hydration Marker Format (v3)
Changed format
The hydration markers embedded in SSR output have been simplified from verbose, index-embedded comment markers to compact, data-free sequential markers.
This is a breaking change for SSR output format. Any system that produces or parses hydration markers must be updated to use the new format. The @microsoft/fast-build Rust crate and WASM binary have been updated accordingly.
FASTElement.define() now returns Promise<TType>. When a template is provided at definition time, the Promise resolves immediately. When templateOptions is "defer-and-hydrate" and no template is provided, the Promise resolves after a template is supplied (e.g. via <f-template>).
FASTElement.compose() now returns Promise<FASTElementDefinition>. The Promise always resolves immediately.
FASTElementDefinition.compose() now returns Promise<FASTElementDefinition>. The Promise always resolves immediately.
@customElement decorator calls define() internally but does not return the Promise (fire-and-forget). For complete definitions with a template, the element is registered via a microtask.
Move the runtime condition into the element and call this.$fastController.addStyles() / this.$fastController.removeStyles() directly.
ElementStyles.behaviors
Move any runtime behavior out of the stylesheet and into the element or controller lifecycle.
CSS bindings in css (for example ``css`color: ${x => x.color}```)
Move the dynamic value into the element and update classes, attributes, or inline styles from element code.
CSSDirective.createCSS(add)
Update directives to implement createCSS() and return only static CSS content.
Changed behavior
css and css.partial() no longer compose HostBehaviors.
css no longer accepts function or Binding interpolations.
ElementStyles is now a fully static style container.
Migration steps
Keep the conditional ElementStyles in a separate css value.
Move the external listener or condition (for example matchMedia() or an app event subscription) into the element lifecycle.
Call this.$fastController.addStyles(styles) when the condition is active and this.$fastController.removeStyles(styles) when it is inactive or during cleanup.
If you previously interpolated bindings or behavior-producing directives into css, replace them with element state and standard DOM or controller updates.