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
It was discovered when targeting the HEAD element, discussed here, that the DOM driver is duplicating the target container when no ID is provided with it. For example, targeting the HEAD tag:
This, of course, is not limited to the HEAD tag but any same-name tag that has an ID provided to neither the target container nor the root VDOM element. For example, given:
This breaking change DOES NOT affect situations where the target container and root VDOM have different tag names. Given the fix proposed in PR #796, and:
function main () {
return {
DOM: xs.of(div('#app', 'page content'))
}
}
run(main, {
DOM: makeDOMDriver('#app')
}
...results in:
<body>
<div id="app">page content</div>
...
This breaking change DOES affect situations where the target container and root VDOM have the same tag name and neither have an ID set. For example, given the fix proposed in PR #796, and:
PR #796: fix(dom): do not duplicate root element with no id
It was discovered when targeting the HEAD element, discussed here, that the DOM driver is duplicating the target container when no ID is provided with it. For example, targeting the HEAD tag:
...currently results in:
This, of course, is not limited to the HEAD tag but any same-name tag that has an ID provided to neither the target container nor the root VDOM element. For example, given:
...and
...currently results in:
Right now this can be overcome by including an empty string ID with the root VDOM object (whether
head
ormain
, ordiv
...):This breaking change DOES NOT affect situations where the target container and root VDOM have different tag names. Given the fix proposed in PR #796, and:
...and
...results in:
And this breaking change DOES NOT affect situations where the target container OR root VDOM have an ID set. Given the fix proposed in PR #796, and:
...and
...results in:
...and
...results in:
This breaking change DOES affect situations where the target container and root VDOM have the same tag name and neither have an ID set. For example, given the fix proposed in PR #796, and:
...and
...results in:
...compared to WITHOUT the proposed fix results in:
The text was updated successfully, but these errors were encountered: