be-free-ranged
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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.

Package Sidebar

Install

npm i be-free-ranged

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

12.6 kB

Total Files

10

Last publish

Collaborators

  • bahrus