Adding the AMP boolean attributes to the attributes module
See original GitHub issueI am trying to render an AMP HTML page using snabbdom. AMP has some custom boolean attributes: amp, ⚡, amp-boilerplate (might be more, I don’t know yet).
Would it be fine to add those attributes to the list of boolean attributes here
Note: currently snabbdom renders those as amp="true"
and that does not pass the AMP validator.
I can work on a fork and try to make all the necessary changes that need to be done for snabbdom to be able to render AMP-compliant pages
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Custom component in Angular 6: values to boolean attributes
I'm developing a web application using Angular 6. I have a question: I would like to create some custom components that are inspired...
Read more >Documentation: <amp-bind> - amp.dev
Hide and reveal and element using the [hidden] attribute. A [hidden] expression should be a boolean expression. Hello there! Hide Show.
Read more >Support boolean attributes in drupal_attributes() [#2847484]
drupal_attributes() should allow boolean values and should output in a way that is consistent with the boolean attribute definition in HTML5 ...
Read more >Boolean attributes on Web Components · Issue #9230 - GitHub
When setting boolean attributes on Web Components they get rendered as attribute/value pairs instead This causes problems with some AMP ...
Read more >HubL Tags - HubSpot Developers
Boolean. A boolean tag creates a checkbox in the UI that prints "true" or "false." In addition to printing the value, this module...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you for reporting this issue @zkochan. The latest release now handles custom boolean attributes seamlessly.
h("div", { attrs: { amp: true} }
results in<div amp>
.Yes, but I don’t think that module should replace attributes module, but instead there should be a special way for providing AMP (and maybe some other non-standard) attributes to VNodes (not in the
data
property), that can be used alongside default attributes module.