Closed atirip closed 5 years ago
hyperHTML.define(
'color-style',
(node, value) => {
node.style.cssText = `color:${value};`;
node.removeAttribute('color-style');
}
);
Nope. This does not work. https://codepen.io/anon/pen/OroBEG?editors=0010
v2.24
fixes this 👋
Thank you.
This is pure cosmetical issue, everything works, but I would like that attribute to be not rendered in when I choose so. The documentation example:
renders into:
without return value - "Its optionally returned value will be used as attribute value." - one would assume that 'color-style' attribute should be missing from DOM as is the case with boolean attributes in general. Also, quite surprisingly
return false;
renders intocolor-style="false"
If you wonder what I am doing, then it is easier for me to pass all arguments as an object in our HTML editor like this: