Skip to content

fix(runtime): double check hostRef value#6341

Merged
christian-bromann merged 1 commit intomainfrom
cb/hostref-check
Jul 12, 2025
Merged

fix(runtime): double check hostRef value#6341
christian-bromann merged 1 commit intomainfrom
cb/hostref-check

Conversation

@christian-bromann
Copy link
Copy Markdown
Member

What is the current behavior?

Currently, the runtime code assumes that getHostRef() always returns a valid hostRef object without null checking. This can lead to runtime errors when getHostRef() returns null or undefined in certain edge cases, causing potential crashes or unexpected behavior in components.

GitHub Issue Number: N/A

What is the new behavior?

This change adds defensive null checks for hostRef values throughout the Stencil runtime to prevent potential runtime errors. The changes include:

  • Added null checks before accessing hostRef properties in hydration, connection callbacks, and component lifecycle methods
  • Used optional chaining (?.) to safely access hostRef properties where appropriate
  • Added early returns when hostRef is null to prevent further execution that would fail
  • Enhanced robustness of the runtime by handling cases where host references might not be available

The changes affect multiple runtime files including:

  • hydrate-app.ts - Added null checks in hydrateComponent
  • proxy-host-element.ts - Used optional chaining for $instanceValues$
  • bootstrap-custom-element.ts - Added null checks in connectedCallback and forceModeUpdate
  • bootstrap-lazy.ts - Added null checks in connection callbacks and componentOnReady
  • client-hydrate.ts - Added null check before accessing component metadata
  • connected-callback.ts - Added early return if hostRef is null
  • disconnected-callback.ts - Used optional chaining for $rmListeners$
  • element.ts - Used optional chaining for $hostElement$
  • hmr-component.ts - Added null check in hmrStart
  • mode.ts - Used optional chaining for $modeName$
  • proxy-component.ts - Added null checks in property setters and lifecycle callbacks
  • set-value.ts - Added null check in setValue
  • update-component.ts - Used optional chaining in forceUpdate

Documentation

No documentation changes required as this is an internal runtime fix.

Does this introduce a breaking change?

  • Yes
  • No

This is a defensive bug fix that only adds safety checks. It does not change any public APIs or expected behavior.

Testing

  • Verified that existing test suites continue to pass
  • Tested edge cases where getHostRef() might return null
  • Confirmed that components continue to function normally in both development and production builds
  • Validated that the changes don't introduce performance regressions

Other information

This is a defensive programming enhancement that improves the robustness of the Stencil runtime by preventing potential null reference errors. The changes maintain backward compatibility while making the runtime more resilient to edge cases.

@christian-bromann christian-bromann requested a review from a team as a code owner July 11, 2025 17:48
Copy link
Copy Markdown
Contributor

@johnjenkins johnjenkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@christian-bromann christian-bromann merged commit 051522f into main Jul 12, 2025
70 checks passed
@christian-bromann christian-bromann deleted the cb/hostref-check branch July 12, 2025 22:24
github-merge-queue bot pushed a commit to ionic-team/ionic-framework that referenced this pull request Jul 29, 2025
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [@stencil/core](https://stenciljs.com/)
([source](https://redirect.github.com/stenciljs/core)) | [`4.33.1` ->
`4.36.0`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.33.1/4.36.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.33.1/4.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>stenciljs/core (@&#8203;stencil/core)</summary>

###
[`v4.36.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4360-2025-07-15)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.36.0...58bc2b5403312dd227b0c5d6f1de167559f2b015)

##### Bug Fixes

* contructable stylesheets with older immutable spec (chrome <99)
([#6332](stenciljs/core#6332))
([2f363dd](stenciljs/core@2f363dd)),
closes [#6326](stenciljs/core#6326)
* **runtime:** check shadow root nodes before appending them
([#6342](stenciljs/core#6342))
([c63f25d](stenciljs/core@c63f25d))
* **runtime:** do not remove first comment - can break frameworks
([#6343](stenciljs/core#6343))
([188e7db](stenciljs/core@188e7db))
* **runtime:** double check hostRef value
([#6341](stenciljs/core#6341))
([051522f](stenciljs/core@051522f))
* **runtime:** fix blur handling of non-scoped elements
([#6314](stenciljs/core#6314))
([bfbd683](stenciljs/core@bfbd683))
* **runtime:** fix prettier
([d84f9e7](stenciljs/core@d84f9e7))
* **ssr:** `scoped: true` components forwarded slots
([#6340](stenciljs/core#6340))
([fd4b892](stenciljs/core@fd4b892)),
closes [#6337](stenciljs/core#6337), closes
[#6339](stenciljs/core#6339)


##### Features

* **moc-doc:** serialize `delegatesFocus` shadow DOM property
([#6333](stenciljs/core#6333))
([56fe6e3](stenciljs/core@56fe6e3)),
closes [#6265](stenciljs/core#6265)
* **runtime:** skip initial task queue to improve first time rendering
([#6331](stenciljs/core#6331))
([6106c70](stenciljs/core@6106c70)),
closes [#6317](stenciljs/core#6317)


###
[`v4.35.3`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4353-2025-07-02)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.2...58bc2b5403312dd227b0c5d6f1de167559f2b015)

##### Bug Fixes

- **declarations:** add ToggleEvent type
([ac92210](https://redirect.github.com/stenciljs/core/commit/ac9221076c0dd25aefc02b85f22bd0cb7216203c))

###
[`v4.35.2`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4352-2025-07-02)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.1...v4.35.2)

##### Bug Fixes

- **ci:** hardening security of GH actions
([#&#8203;6305](https://redirect.github.com/stenciljs/core/issues/6305))
([3f80413](https://redirect.github.com/stenciljs/core/commit/3f80413171fadd150da36ff7abdad865226a54ae))
- **compiler:** fix attachInternals should be usable without formAssoc…
([#&#8203;6286](https://redirect.github.com/stenciljs/core/issues/6286))
([7132259](https://redirect.github.com/stenciljs/core/commit/7132259c40d231f03f521c6cbe19083a467795de)),
closes
[#&#8203;6285](https://redirect.github.com/stenciljs/core/issues/6285)
- **declarations:** update toggle event handler types
([#&#8203;6323](https://redirect.github.com/stenciljs/core/issues/6323))
([5925974](https://redirect.github.com/stenciljs/core/commit/5925974d857c8d2a7b8b85e21478c7e3942888e8)),
closes
[#&#8203;6322](https://redirect.github.com/stenciljs/core/issues/6322)
- **mock-doc:** prevent infinite recursion in blur event handlers
([#&#8203;6310](https://redirect.github.com/stenciljs/core/issues/6310))
([092cacd](https://redirect.github.com/stenciljs/core/commit/092cacda99b318ee8ccc7ad51591da07c869c366)),
closes
[#&#8203;6307](https://redirect.github.com/stenciljs/core/issues/6307)
- **security:** update email for outreach
([9da2c90](https://redirect.github.com/stenciljs/core/commit/9da2c907af4012a4c006279870b04e7a9bae73b2))
- **ssr:** fixes for `scoped: true` components during SSR
([#&#8203;6311](https://redirect.github.com/stenciljs/core/issues/6311))
([b07dda6](https://redirect.github.com/stenciljs/core/commit/b07dda6c94a8f9c0262ebbd303582ba5ee209648)),
closes
[#&#8203;6313](https://redirect.github.com/stenciljs/core/issues/6313)
- **ssr:** slow property hydration, incorrect rendering
([#&#8203;6325](https://redirect.github.com/stenciljs/core/issues/6325))
([f018c73](https://redirect.github.com/stenciljs/core/commit/f018c7349c38dbb467e5cdcebceefa3bd0e392cc)),
closes
[#&#8203;6324](https://redirect.github.com/stenciljs/core/issues/6324)
- **utils:** single global stylesheet instance for performance
([#&#8203;6320](https://redirect.github.com/stenciljs/core/issues/6320))
([fe5d130](https://redirect.github.com/stenciljs/core/commit/fe5d1301270e21203009f8f6efece32fb491936d))
- **testing:** support browser executable path detection via environm…
([#&#8203;6308](https://redirect.github.com/stenciljs/core/issues/6308))
([b7e2b50](https://redirect.github.com/stenciljs/core/commit/b7e2b50120b1e69d797160a27f8d31c674f0ac13)),
closes
[#&#8203;6213](https://redirect.github.com/stenciljs/core/issues/6213)

###
[`v4.35.1`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4351-2025-06-17)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.0...v4.35.1)

##### Bug Fixes

- **mock-doc:** ensure event bubbling follows shadow DOM boundaries
([#&#8203;6301](https://redirect.github.com/stenciljs/core/issues/6301))
([1304ffc](https://redirect.github.com/stenciljs/core/commit/1304ffcbfec3ff981ffabe26f8cda6eedc784c52)),
closes
[#&#8203;5676](https://redirect.github.com/stenciljs/core/issues/5676)
- **ssr:** expand `::part` css selectors for ssr `scoped` components
([#&#8203;6298](https://redirect.github.com/stenciljs/core/issues/6298))
([da24af6](https://redirect.github.com/stenciljs/core/commit/da24af6f5c5211a26e03a3132bc7281346d8ccee)),
closes
[#&#8203;6297](https://redirect.github.com/stenciljs/core/issues/6297)
- **ssr:** named slot dom order with `serializeShadowRoot: 'scoped'`
components
([#&#8203;6300](https://redirect.github.com/stenciljs/core/issues/6300))
([96c0f13](https://redirect.github.com/stenciljs/core/commit/96c0f13b061ee45ed4596c44dd0e2abd701b6605)),
closes
[#&#8203;6299](https://redirect.github.com/stenciljs/core/issues/6299)

###
[`v4.35.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4350-2025-06-13)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.34.0...v4.35.0)

##### Bug Fixes

- **ssr:** retain slotted node order in serializeShadowRoot: `scoped`
([#&#8203;6294](https://redirect.github.com/stenciljs/core/issues/6294))
([c1e032d](https://redirect.github.com/stenciljs/core/commit/c1e032d562c2ef8f93248317c01186a366a12442)),
closes
[#&#8203;6293](https://redirect.github.com/stenciljs/core/issues/6293)

##### Features

- **global-styles:** add new `addGlobalStyleToComponents` extras config
option to "opt-out" of new globalStyle behaviour
([#&#8203;6292](https://redirect.github.com/stenciljs/core/issues/6292))
([cd9778a](https://redirect.github.com/stenciljs/core/commit/cd9778a2ac934944b4b76d720d0ff73a6d5d1b05))

###
[`v4.34.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4340-2025-06-11)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.33.1...v4.34.0)

##### Bug Fixes

- **compiler:** Prevent `extTransformsPlugin` from outputting collection
dependency css
([#&#8203;3306](https://redirect.github.com/stenciljs/core/issues/3306))
([28e2a06](https://redirect.github.com/stenciljs/core/commit/28e2a062f6c0e107c0a8d25c18304b5db79f0fb4)),
closes
[#&#8203;3305](https://redirect.github.com/stenciljs/core/issues/3305)
- **declarations:** update PluginTransformResults after Rollup update
([#&#8203;6232](https://redirect.github.com/stenciljs/core/issues/6232))
([6ff8075](https://redirect.github.com/stenciljs/core/commit/6ff8075a8561b1e548ee437a887714599bf2ac39)),
closes
[#&#8203;6231](https://redirect.github.com/stenciljs/core/issues/6231)
- **mock-doc:** move slot event listener support from runtime to MockDoc
([#&#8203;6287](https://redirect.github.com/stenciljs/core/issues/6287))
([f2dd25d](https://redirect.github.com/stenciljs/core/commit/f2dd25d7e0e49b170d8683904e6e3219fa902cb0))
- resolve TypeScript interface conflicts between component methods and
HTMLElement
([#&#8203;6282](https://redirect.github.com/stenciljs/core/issues/6282))
([614d305](https://redirect.github.com/stenciljs/core/commit/614d305b1db84f2b2c0b9b1525fa97bc6508a081)),
closes
[#&#8203;4467](https://redirect.github.com/stenciljs/core/issues/4467)
- **runtime:** add addEventListener support for slot elements in scope
components
([#&#8203;6281](https://redirect.github.com/stenciljs/core/issues/6281))
([32f66bd](https://redirect.github.com/stenciljs/core/commit/32f66bd1cf08694b4fe9abc70e076a68e1d2d731)),
closes
[#&#8203;6269](https://redirect.github.com/stenciljs/core/issues/6269)
- **runtime:** correct boolean attribute handling for form-associated
components
([#&#8203;6280](https://redirect.github.com/stenciljs/core/issues/6280))
([7fe6372](https://redirect.github.com/stenciljs/core/commit/7fe6372c2a203b13e50a6d480ad39c8a4289adde)),
closes
[#&#8203;5461](https://redirect.github.com/stenciljs/core/issues/5461)
- **ssr:** mixed ssr methods styles
([#&#8203;6289](https://redirect.github.com/stenciljs/core/issues/6289))
([e253ceb](https://redirect.github.com/stenciljs/core/commit/e253cebf547cb98831cea8afb01a5bf9fe0a3d36)),
closes
[#&#8203;6288](https://redirect.github.com/stenciljs/core/issues/6288)
- update `CHANGELOG.md` location
([#&#8203;6283](https://redirect.github.com/stenciljs/core/issues/6283))
([36fca61](https://redirect.github.com/stenciljs/core/commit/36fca61886161df0f06f95a76e0f60b16952dcdc))

##### Features

- **compiler:** improve file watching architecture and add external d…
([#&#8203;6279](https://redirect.github.com/stenciljs/core/issues/6279))
([0844538](https://redirect.github.com/stenciljs/core/commit/0844538a04f47d10f6a6d9e3c019808dfccf376b)),
closes
[#&#8203;3151](https://redirect.github.com/stenciljs/core/issues/3151)

#### 🥃
[4.33.1](https://redirect.github.com/stenciljs/core/compare/v4.33.0...v4.33.1)
(2025-06-03)

##### Bug Fixes

- **runtime:** conditionally apply global styles using
`supportsConstructableStylesheets` flag
([f4f815f](https://redirect.github.com/stenciljs/core/commit/f4f815f4624d8df7332ea9762e08a153a66a4c94))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDEuMTcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian Bromann <git@bromann.dev>
Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
github-merge-queue bot pushed a commit to ionic-team/ionic-framework that referenced this pull request Jul 29, 2025
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [@stencil/core](https://stenciljs.com/)
([source](https://redirect.github.com/stenciljs/core)) | [`4.33.1` ->
`4.36.0`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.33.1/4.36.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.33.1/4.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>stenciljs/core (@&#8203;stencil/core)</summary>

###
[`v4.36.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4360-2025-07-15)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.36.0...58bc2b5403312dd227b0c5d6f1de167559f2b015)

##### Bug Fixes

* contructable stylesheets with older immutable spec (chrome <99)
([#6332](stenciljs/core#6332))
([2f363dd](stenciljs/core@2f363dd)),
closes [#6326](stenciljs/core#6326)
* **runtime:** check shadow root nodes before appending them
([#6342](stenciljs/core#6342))
([c63f25d](stenciljs/core@c63f25d))
* **runtime:** do not remove first comment - can break frameworks
([#6343](stenciljs/core#6343))
([188e7db](stenciljs/core@188e7db))
* **runtime:** double check hostRef value
([#6341](stenciljs/core#6341))
([051522f](stenciljs/core@051522f))
* **runtime:** fix blur handling of non-scoped elements
([#6314](stenciljs/core#6314))
([bfbd683](stenciljs/core@bfbd683))
* **runtime:** fix prettier
([d84f9e7](stenciljs/core@d84f9e7))
* **ssr:** `scoped: true` components forwarded slots
([#6340](stenciljs/core#6340))
([fd4b892](stenciljs/core@fd4b892)),
closes [#6337](stenciljs/core#6337), closes
[#6339](stenciljs/core#6339)


##### Features

* **moc-doc:** serialize `delegatesFocus` shadow DOM property
([#6333](stenciljs/core#6333))
([56fe6e3](stenciljs/core@56fe6e3)),
closes [#6265](stenciljs/core#6265)
* **runtime:** skip initial task queue to improve first time rendering
([#6331](stenciljs/core#6331))
([6106c70](stenciljs/core@6106c70)),
closes [#6317](stenciljs/core#6317)


###
[`v4.35.3`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4353-2025-07-02)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.2...58bc2b5403312dd227b0c5d6f1de167559f2b015)

##### Bug Fixes

- **declarations:** add ToggleEvent type
([ac92210](https://redirect.github.com/stenciljs/core/commit/ac9221076c0dd25aefc02b85f22bd0cb7216203c))

###
[`v4.35.2`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4352-2025-07-02)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.1...v4.35.2)

##### Bug Fixes

- **ci:** hardening security of GH actions
([#&#8203;6305](https://redirect.github.com/stenciljs/core/issues/6305))
([3f80413](https://redirect.github.com/stenciljs/core/commit/3f80413171fadd150da36ff7abdad865226a54ae))
- **compiler:** fix attachInternals should be usable without formAssoc…
([#&#8203;6286](https://redirect.github.com/stenciljs/core/issues/6286))
([7132259](https://redirect.github.com/stenciljs/core/commit/7132259c40d231f03f521c6cbe19083a467795de)),
closes
[#&#8203;6285](https://redirect.github.com/stenciljs/core/issues/6285)
- **declarations:** update toggle event handler types
([#&#8203;6323](https://redirect.github.com/stenciljs/core/issues/6323))
([5925974](https://redirect.github.com/stenciljs/core/commit/5925974d857c8d2a7b8b85e21478c7e3942888e8)),
closes
[#&#8203;6322](https://redirect.github.com/stenciljs/core/issues/6322)
- **mock-doc:** prevent infinite recursion in blur event handlers
([#&#8203;6310](https://redirect.github.com/stenciljs/core/issues/6310))
([092cacd](https://redirect.github.com/stenciljs/core/commit/092cacda99b318ee8ccc7ad51591da07c869c366)),
closes
[#&#8203;6307](https://redirect.github.com/stenciljs/core/issues/6307)
- **security:** update email for outreach
([9da2c90](https://redirect.github.com/stenciljs/core/commit/9da2c907af4012a4c006279870b04e7a9bae73b2))
- **ssr:** fixes for `scoped: true` components during SSR
([#&#8203;6311](https://redirect.github.com/stenciljs/core/issues/6311))
([b07dda6](https://redirect.github.com/stenciljs/core/commit/b07dda6c94a8f9c0262ebbd303582ba5ee209648)),
closes
[#&#8203;6313](https://redirect.github.com/stenciljs/core/issues/6313)
- **ssr:** slow property hydration, incorrect rendering
([#&#8203;6325](https://redirect.github.com/stenciljs/core/issues/6325))
([f018c73](https://redirect.github.com/stenciljs/core/commit/f018c7349c38dbb467e5cdcebceefa3bd0e392cc)),
closes
[#&#8203;6324](https://redirect.github.com/stenciljs/core/issues/6324)
- **utils:** single global stylesheet instance for performance
([#&#8203;6320](https://redirect.github.com/stenciljs/core/issues/6320))
([fe5d130](https://redirect.github.com/stenciljs/core/commit/fe5d1301270e21203009f8f6efece32fb491936d))
- **testing:** support browser executable path detection via environm…
([#&#8203;6308](https://redirect.github.com/stenciljs/core/issues/6308))
([b7e2b50](https://redirect.github.com/stenciljs/core/commit/b7e2b50120b1e69d797160a27f8d31c674f0ac13)),
closes
[#&#8203;6213](https://redirect.github.com/stenciljs/core/issues/6213)

###
[`v4.35.1`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4351-2025-06-17)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.0...v4.35.1)

##### Bug Fixes

- **mock-doc:** ensure event bubbling follows shadow DOM boundaries
([#&#8203;6301](https://redirect.github.com/stenciljs/core/issues/6301))
([1304ffc](https://redirect.github.com/stenciljs/core/commit/1304ffcbfec3ff981ffabe26f8cda6eedc784c52)),
closes
[#&#8203;5676](https://redirect.github.com/stenciljs/core/issues/5676)
- **ssr:** expand `::part` css selectors for ssr `scoped` components
([#&#8203;6298](https://redirect.github.com/stenciljs/core/issues/6298))
([da24af6](https://redirect.github.com/stenciljs/core/commit/da24af6f5c5211a26e03a3132bc7281346d8ccee)),
closes
[#&#8203;6297](https://redirect.github.com/stenciljs/core/issues/6297)
- **ssr:** named slot dom order with `serializeShadowRoot: 'scoped'`
components
([#&#8203;6300](https://redirect.github.com/stenciljs/core/issues/6300))
([96c0f13](https://redirect.github.com/stenciljs/core/commit/96c0f13b061ee45ed4596c44dd0e2abd701b6605)),
closes
[#&#8203;6299](https://redirect.github.com/stenciljs/core/issues/6299)

###
[`v4.35.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4350-2025-06-13)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.34.0...v4.35.0)

##### Bug Fixes

- **ssr:** retain slotted node order in serializeShadowRoot: `scoped`
([#&#8203;6294](https://redirect.github.com/stenciljs/core/issues/6294))
([c1e032d](https://redirect.github.com/stenciljs/core/commit/c1e032d562c2ef8f93248317c01186a366a12442)),
closes
[#&#8203;6293](https://redirect.github.com/stenciljs/core/issues/6293)

##### Features

- **global-styles:** add new `addGlobalStyleToComponents` extras config
option to "opt-out" of new globalStyle behaviour
([#&#8203;6292](https://redirect.github.com/stenciljs/core/issues/6292))
([cd9778a](https://redirect.github.com/stenciljs/core/commit/cd9778a2ac934944b4b76d720d0ff73a6d5d1b05))

###
[`v4.34.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4340-2025-06-11)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.33.1...v4.34.0)

##### Bug Fixes

- **compiler:** Prevent `extTransformsPlugin` from outputting collection
dependency css
([#&#8203;3306](https://redirect.github.com/stenciljs/core/issues/3306))
([28e2a06](https://redirect.github.com/stenciljs/core/commit/28e2a062f6c0e107c0a8d25c18304b5db79f0fb4)),
closes
[#&#8203;3305](https://redirect.github.com/stenciljs/core/issues/3305)
- **declarations:** update PluginTransformResults after Rollup update
([#&#8203;6232](https://redirect.github.com/stenciljs/core/issues/6232))
([6ff8075](https://redirect.github.com/stenciljs/core/commit/6ff8075a8561b1e548ee437a887714599bf2ac39)),
closes
[#&#8203;6231](https://redirect.github.com/stenciljs/core/issues/6231)
- **mock-doc:** move slot event listener support from runtime to MockDoc
([#&#8203;6287](https://redirect.github.com/stenciljs/core/issues/6287))
([f2dd25d](https://redirect.github.com/stenciljs/core/commit/f2dd25d7e0e49b170d8683904e6e3219fa902cb0))
- resolve TypeScript interface conflicts between component methods and
HTMLElement
([#&#8203;6282](https://redirect.github.com/stenciljs/core/issues/6282))
([614d305](https://redirect.github.com/stenciljs/core/commit/614d305b1db84f2b2c0b9b1525fa97bc6508a081)),
closes
[#&#8203;4467](https://redirect.github.com/stenciljs/core/issues/4467)
- **runtime:** add addEventListener support for slot elements in scope
components
([#&#8203;6281](https://redirect.github.com/stenciljs/core/issues/6281))
([32f66bd](https://redirect.github.com/stenciljs/core/commit/32f66bd1cf08694b4fe9abc70e076a68e1d2d731)),
closes
[#&#8203;6269](https://redirect.github.com/stenciljs/core/issues/6269)
- **runtime:** correct boolean attribute handling for form-associated
components
([#&#8203;6280](https://redirect.github.com/stenciljs/core/issues/6280))
([7fe6372](https://redirect.github.com/stenciljs/core/commit/7fe6372c2a203b13e50a6d480ad39c8a4289adde)),
closes
[#&#8203;5461](https://redirect.github.com/stenciljs/core/issues/5461)
- **ssr:** mixed ssr methods styles
([#&#8203;6289](https://redirect.github.com/stenciljs/core/issues/6289))
([e253ceb](https://redirect.github.com/stenciljs/core/commit/e253cebf547cb98831cea8afb01a5bf9fe0a3d36)),
closes
[#&#8203;6288](https://redirect.github.com/stenciljs/core/issues/6288)
- update `CHANGELOG.md` location
([#&#8203;6283](https://redirect.github.com/stenciljs/core/issues/6283))
([36fca61](https://redirect.github.com/stenciljs/core/commit/36fca61886161df0f06f95a76e0f60b16952dcdc))

##### Features

- **compiler:** improve file watching architecture and add external d…
([#&#8203;6279](https://redirect.github.com/stenciljs/core/issues/6279))
([0844538](https://redirect.github.com/stenciljs/core/commit/0844538a04f47d10f6a6d9e3c019808dfccf376b)),
closes
[#&#8203;3151](https://redirect.github.com/stenciljs/core/issues/3151)

#### 🥃
[4.33.1](https://redirect.github.com/stenciljs/core/compare/v4.33.0...v4.33.1)
(2025-06-03)

##### Bug Fixes

- **runtime:** conditionally apply global styles using
`supportsConstructableStylesheets` flag
([f4f815f](https://redirect.github.com/stenciljs/core/commit/f4f815f4624d8df7332ea9762e08a153a66a4c94))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDEuMTcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian Bromann <git@bromann.dev>
Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
github-merge-queue bot pushed a commit to ionic-team/ionic-framework that referenced this pull request Jul 29, 2025
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [@stencil/core](https://stenciljs.com/)
([source](https://redirect.github.com/stenciljs/core)) | [`4.33.1` ->
`4.36.0`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.33.1/4.36.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.33.1/4.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>stenciljs/core (@&#8203;stencil/core)</summary>

###
[`v4.36.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4360-2025-07-15)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.36.0...58bc2b5403312dd227b0c5d6f1de167559f2b015)

##### Bug Fixes

* contructable stylesheets with older immutable spec (chrome <99)
([#6332](stenciljs/core#6332))
([2f363dd](stenciljs/core@2f363dd)),
closes [#6326](stenciljs/core#6326)
* **runtime:** check shadow root nodes before appending them
([#6342](stenciljs/core#6342))
([c63f25d](stenciljs/core@c63f25d))
* **runtime:** do not remove first comment - can break frameworks
([#6343](stenciljs/core#6343))
([188e7db](stenciljs/core@188e7db))
* **runtime:** double check hostRef value
([#6341](stenciljs/core#6341))
([051522f](stenciljs/core@051522f))
* **runtime:** fix blur handling of non-scoped elements
([#6314](stenciljs/core#6314))
([bfbd683](stenciljs/core@bfbd683))
* **runtime:** fix prettier
([d84f9e7](stenciljs/core@d84f9e7))
* **ssr:** `scoped: true` components forwarded slots
([#6340](stenciljs/core#6340))
([fd4b892](stenciljs/core@fd4b892)),
closes [#6337](stenciljs/core#6337), closes
[#6339](stenciljs/core#6339)


##### Features

* **moc-doc:** serialize `delegatesFocus` shadow DOM property
([#6333](stenciljs/core#6333))
([56fe6e3](stenciljs/core@56fe6e3)),
closes [#6265](stenciljs/core#6265)
* **runtime:** skip initial task queue to improve first time rendering
([#6331](stenciljs/core#6331))
([6106c70](stenciljs/core@6106c70)),
closes [#6317](stenciljs/core#6317)


###
[`v4.35.3`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4353-2025-07-02)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.2...58bc2b5403312dd227b0c5d6f1de167559f2b015)

##### Bug Fixes

- **declarations:** add ToggleEvent type
([ac92210](https://redirect.github.com/stenciljs/core/commit/ac9221076c0dd25aefc02b85f22bd0cb7216203c))

###
[`v4.35.2`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4352-2025-07-02)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.1...v4.35.2)

##### Bug Fixes

- **ci:** hardening security of GH actions
([#&#8203;6305](https://redirect.github.com/stenciljs/core/issues/6305))
([3f80413](https://redirect.github.com/stenciljs/core/commit/3f80413171fadd150da36ff7abdad865226a54ae))
- **compiler:** fix attachInternals should be usable without formAssoc…
([#&#8203;6286](https://redirect.github.com/stenciljs/core/issues/6286))
([7132259](https://redirect.github.com/stenciljs/core/commit/7132259c40d231f03f521c6cbe19083a467795de)),
closes
[#&#8203;6285](https://redirect.github.com/stenciljs/core/issues/6285)
- **declarations:** update toggle event handler types
([#&#8203;6323](https://redirect.github.com/stenciljs/core/issues/6323))
([5925974](https://redirect.github.com/stenciljs/core/commit/5925974d857c8d2a7b8b85e21478c7e3942888e8)),
closes
[#&#8203;6322](https://redirect.github.com/stenciljs/core/issues/6322)
- **mock-doc:** prevent infinite recursion in blur event handlers
([#&#8203;6310](https://redirect.github.com/stenciljs/core/issues/6310))
([092cacd](https://redirect.github.com/stenciljs/core/commit/092cacda99b318ee8ccc7ad51591da07c869c366)),
closes
[#&#8203;6307](https://redirect.github.com/stenciljs/core/issues/6307)
- **security:** update email for outreach
([9da2c90](https://redirect.github.com/stenciljs/core/commit/9da2c907af4012a4c006279870b04e7a9bae73b2))
- **ssr:** fixes for `scoped: true` components during SSR
([#&#8203;6311](https://redirect.github.com/stenciljs/core/issues/6311))
([b07dda6](https://redirect.github.com/stenciljs/core/commit/b07dda6c94a8f9c0262ebbd303582ba5ee209648)),
closes
[#&#8203;6313](https://redirect.github.com/stenciljs/core/issues/6313)
- **ssr:** slow property hydration, incorrect rendering
([#&#8203;6325](https://redirect.github.com/stenciljs/core/issues/6325))
([f018c73](https://redirect.github.com/stenciljs/core/commit/f018c7349c38dbb467e5cdcebceefa3bd0e392cc)),
closes
[#&#8203;6324](https://redirect.github.com/stenciljs/core/issues/6324)
- **utils:** single global stylesheet instance for performance
([#&#8203;6320](https://redirect.github.com/stenciljs/core/issues/6320))
([fe5d130](https://redirect.github.com/stenciljs/core/commit/fe5d1301270e21203009f8f6efece32fb491936d))
- **testing:** support browser executable path detection via environm…
([#&#8203;6308](https://redirect.github.com/stenciljs/core/issues/6308))
([b7e2b50](https://redirect.github.com/stenciljs/core/commit/b7e2b50120b1e69d797160a27f8d31c674f0ac13)),
closes
[#&#8203;6213](https://redirect.github.com/stenciljs/core/issues/6213)

###
[`v4.35.1`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4351-2025-06-17)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.35.0...v4.35.1)

##### Bug Fixes

- **mock-doc:** ensure event bubbling follows shadow DOM boundaries
([#&#8203;6301](https://redirect.github.com/stenciljs/core/issues/6301))
([1304ffc](https://redirect.github.com/stenciljs/core/commit/1304ffcbfec3ff981ffabe26f8cda6eedc784c52)),
closes
[#&#8203;5676](https://redirect.github.com/stenciljs/core/issues/5676)
- **ssr:** expand `::part` css selectors for ssr `scoped` components
([#&#8203;6298](https://redirect.github.com/stenciljs/core/issues/6298))
([da24af6](https://redirect.github.com/stenciljs/core/commit/da24af6f5c5211a26e03a3132bc7281346d8ccee)),
closes
[#&#8203;6297](https://redirect.github.com/stenciljs/core/issues/6297)
- **ssr:** named slot dom order with `serializeShadowRoot: 'scoped'`
components
([#&#8203;6300](https://redirect.github.com/stenciljs/core/issues/6300))
([96c0f13](https://redirect.github.com/stenciljs/core/commit/96c0f13b061ee45ed4596c44dd0e2abd701b6605)),
closes
[#&#8203;6299](https://redirect.github.com/stenciljs/core/issues/6299)

###
[`v4.35.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4350-2025-06-13)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.34.0...v4.35.0)

##### Bug Fixes

- **ssr:** retain slotted node order in serializeShadowRoot: `scoped`
([#&#8203;6294](https://redirect.github.com/stenciljs/core/issues/6294))
([c1e032d](https://redirect.github.com/stenciljs/core/commit/c1e032d562c2ef8f93248317c01186a366a12442)),
closes
[#&#8203;6293](https://redirect.github.com/stenciljs/core/issues/6293)

##### Features

- **global-styles:** add new `addGlobalStyleToComponents` extras config
option to "opt-out" of new globalStyle behaviour
([#&#8203;6292](https://redirect.github.com/stenciljs/core/issues/6292))
([cd9778a](https://redirect.github.com/stenciljs/core/commit/cd9778a2ac934944b4b76d720d0ff73a6d5d1b05))

###
[`v4.34.0`](https://redirect.github.com/stenciljs/core/blob/HEAD/CHANGELOG.md#-4340-2025-06-11)

[Compare
Source](https://redirect.github.com/stenciljs/core/compare/v4.33.1...v4.34.0)

##### Bug Fixes

- **compiler:** Prevent `extTransformsPlugin` from outputting collection
dependency css
([#&#8203;3306](https://redirect.github.com/stenciljs/core/issues/3306))
([28e2a06](https://redirect.github.com/stenciljs/core/commit/28e2a062f6c0e107c0a8d25c18304b5db79f0fb4)),
closes
[#&#8203;3305](https://redirect.github.com/stenciljs/core/issues/3305)
- **declarations:** update PluginTransformResults after Rollup update
([#&#8203;6232](https://redirect.github.com/stenciljs/core/issues/6232))
([6ff8075](https://redirect.github.com/stenciljs/core/commit/6ff8075a8561b1e548ee437a887714599bf2ac39)),
closes
[#&#8203;6231](https://redirect.github.com/stenciljs/core/issues/6231)
- **mock-doc:** move slot event listener support from runtime to MockDoc
([#&#8203;6287](https://redirect.github.com/stenciljs/core/issues/6287))
([f2dd25d](https://redirect.github.com/stenciljs/core/commit/f2dd25d7e0e49b170d8683904e6e3219fa902cb0))
- resolve TypeScript interface conflicts between component methods and
HTMLElement
([#&#8203;6282](https://redirect.github.com/stenciljs/core/issues/6282))
([614d305](https://redirect.github.com/stenciljs/core/commit/614d305b1db84f2b2c0b9b1525fa97bc6508a081)),
closes
[#&#8203;4467](https://redirect.github.com/stenciljs/core/issues/4467)
- **runtime:** add addEventListener support for slot elements in scope
components
([#&#8203;6281](https://redirect.github.com/stenciljs/core/issues/6281))
([32f66bd](https://redirect.github.com/stenciljs/core/commit/32f66bd1cf08694b4fe9abc70e076a68e1d2d731)),
closes
[#&#8203;6269](https://redirect.github.com/stenciljs/core/issues/6269)
- **runtime:** correct boolean attribute handling for form-associated
components
([#&#8203;6280](https://redirect.github.com/stenciljs/core/issues/6280))
([7fe6372](https://redirect.github.com/stenciljs/core/commit/7fe6372c2a203b13e50a6d480ad39c8a4289adde)),
closes
[#&#8203;5461](https://redirect.github.com/stenciljs/core/issues/5461)
- **ssr:** mixed ssr methods styles
([#&#8203;6289](https://redirect.github.com/stenciljs/core/issues/6289))
([e253ceb](https://redirect.github.com/stenciljs/core/commit/e253cebf547cb98831cea8afb01a5bf9fe0a3d36)),
closes
[#&#8203;6288](https://redirect.github.com/stenciljs/core/issues/6288)
- update `CHANGELOG.md` location
([#&#8203;6283](https://redirect.github.com/stenciljs/core/issues/6283))
([36fca61](https://redirect.github.com/stenciljs/core/commit/36fca61886161df0f06f95a76e0f60b16952dcdc))

##### Features

- **compiler:** improve file watching architecture and add external d…
([#&#8203;6279](https://redirect.github.com/stenciljs/core/issues/6279))
([0844538](https://redirect.github.com/stenciljs/core/commit/0844538a04f47d10f6a6d9e3c019808dfccf376b)),
closes
[#&#8203;3151](https://redirect.github.com/stenciljs/core/issues/3151)

#### 🥃
[4.33.1](https://redirect.github.com/stenciljs/core/compare/v4.33.0...v4.33.1)
(2025-06-03)

##### Bug Fixes

- **runtime:** conditionally apply global styles using
`supportsConstructableStylesheets` flag
([f4f815f](https://redirect.github.com/stenciljs/core/commit/f4f815f4624d8df7332ea9762e08a153a66a4c94))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDEuMTcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian Bromann <git@bromann.dev>
Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants