4 ms·
My sample is correct. CSS prototype property is a Sciter specific extension. When the engine computes styles it does [if needed] this (pseudocode): Object
by c-smile 4y ago
My sample is correct.
CSS prototype property is a Sciter specific extension.
When the engine computes styles it does [if needed] this (pseudocode):
Object.setPrototypeOf(element, thatClass);
element.componentDidMount();
on applied elements.
There is no "performance sacrifice" in case of handling prototype properties.
Prototypes are switchable if needed:
div.beer { prototype: Beer url(...); }
div.beer:hover { prototype: BeerHovered url(...); }
- ttfkam 4y agoOh geez. It's Internet Explorer CSS Behaviors all over again. "Those who do not learn from the past…"
- c-smile 4y agoClose but not exactly, there is no esoteric HTC stuff for example. element.selector { prototype: ClassName url(in-module.js); color: blue; ... } That above is significantly better than almost-dead-at-birth WebComponents: let customElementRegistry = window.customElements; customElementRegistry.define('my-custom-element', MyCustomElement); One simple CSS property instead of 20+ additional entities https://developer.mozilla.org/en-US/docs/Web/Web_Components https://developer.mozilla.org/en-US/docs/Web/Web_Components Used quite a lot actually, on half of machines where Sciter is installed (~500..600 mln machines :)
- earthboundkid 4y agoWeb Components is a marketing coup. It’s a great name. People wish it existed and did the thing it says. So they ignore that customElement and shadow DOM are two terrible APIs that are best ignored by 99% of developers… Meanwhile, shit that would actually help framework authors, like native morphDOM don’t happen.