0.0.1 • Published 1 year ago

be-free-ranged v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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:

  1. Attaches "scope" to element with attribute data-cnt
  2. Adds property innerHTML, method appendChild, etc to scope.