be-free-ranged
v0.0.1
Published
Manage a range of next siblings as if they were children
Downloads
1
Maintainers
Readme
be-free-ranged [TODO]
be-free-ranged is another ("whiteboarding" at this point) go at something that was (is?) trying to be accomplished with things like shadow-fax, xtal-fragment, xt-f, lazy-mt.
One limitation of web components, is that they make most sense when they "own" nested children -- either in the ShadowDOM Root, or the standard children if forgoing Shadow DOM.
But there are some important edge cases where that limitation is a bit of an issue, especially when working with built-in elements like tables or ul's.
It is noteworthy that frameworks support this as well.
<template id=three-lis>
<li data-cnt=3>List Item 1</li>
<li>List Item 2</li>
<li>List Item 3</li>
<template>
<ul>
<li>Header</li>
<template be-free-ranged=three-lis></template>
<li>Footer</li>
</ul>
... does the following:
- Attaches "scope" to element with attribute data-cnt
- Adds property innerHTML, method appendChild, etc to scope.