Skip to content

Auto detect custom element child type#502

Merged
agubler merged 3 commits into
dojo:masterfrom
agubler:auto-detect-child-type
Aug 22, 2019
Merged

Auto detect custom element child type#502
agubler merged 3 commits into
dojo:masterfrom
agubler:auto-detect-child-type

Conversation

@agubler
Copy link
Copy Markdown
Member

@agubler agubler commented Aug 21, 2019

Type: feature

The following has been addressed in the PR:

Description:

The previous attempt to auto detect childType only worked when the CE javascript was loaded before the element was created. If the CE javascript was loaded after the custom element is created then it caused issues with hydration (as dojo didn't know what was a Dojo CE and what wasn't).

The current behaviour only supports a single specified child type per widget and this auto detection mirrors that. It is assumed that if there are any children with a - character that the childType is DOJO otherwise it's NODE/TEXT.

If a widget is specifically for non Dojo CE children then the existing configuration can be used.

Note: Additionally empty text nodes are filtered out from the childNodes

Supersedes #494
Resolves #304

@agubler agubler added area: core Core enhancement New feature or request labels Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Core enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically detect custom element child types

2 participants