be-rewritten
v0.0.3
Published
[![NPM version](https://badge.fury.io/js/be-rewritten.png)](http://badge.fury.io/js/be-rewritten) [![Playwright Tests](https://github.com/bahrus/be-rewritten/actions/workflows/CI.yml/badge.svg?branch=baseline)](https://github.com/bahrus/be-rewritten/acti
Downloads
3
Maintainers
Readme
be-rewritten
Backdrop
The platform is showing very little interest in my proposal to allow processing of streaming HTML in a service worker (sniff!). Consequently, we have little choice but to do something on the main thread when we stream in HTML, which is what this element decorator does, via mutation observing (sigh).
Mission
be-rewritten extends be-written, by adding the ability to apply be-decorated element behaviors on selected elements as they render onto the screen, including DTR and xslt transforms.
<div be-rewritten='{
"from": "",
"make":{
"cssSelector1": {
"be": "metamorphic",
"having": {
"whenDefined": ["ui5-li", "ui5-list"],
"xslt": "./ui5-list.xslt"
}
}
}
}'>
User must provide references to be-decorated web components separately.
If web component is not yet registered, simply adds the attribute.
Can also be an array:
<div be-rewritten='{
"from": "",
"match":{
"cssSelector1": [
{
"be": "metamorphic",
"having": {
"whenDefined": ["ui5-li", "ui5-list"],
"xslt": "./ui5-list.xslt"
}
}, {
"be": "melodramatic",
"having": {
"writer": "Jin-joo"
}
}
]
}
}'>
If the css selector requires a single quote, use ' . If double quote, use " .