A cool thing that could be done in Rust is enumerate all valid properties for DOM elements, and front it with and html!() macro (for convenience). Would allow compile-time validation of the markup that's written, which is a level of trust that I haven't seen anywhere else yet.
-
Show this thread
-
This would probably be a lot of work to generate by hand though. I wonder if there's WebIDL specs for DOM elements available.
4 replies 0 retweets 1 likeShow this thread -
Replying to @yoshuawuyts
https://dom.spec.whatwg.org/ for core DOM things, in general open the element's page on MDN and look for the spec links at the bottom
2 replies 0 retweets 2 likes -
Replying to @ManishEarth @yoshuawuyts
Well, I guess a small snag is that WebIDL tells you about JS attributes (http://element.foo = "bar"), not content attributes (<element foo=bar>). JS attributes often reflect content attributes but not always. You can probably scrape this data from MDN.
1 reply 0 retweets 1 like -
Made a document on Paper to track this! https://paper.dropbox.com/doc/2018-10-26-Strictly-Typed-HTML-Templates--AQNEVFTXBka8XQc5wam7CS0HAQ-axQLgQspKJ2KeClHRySwy …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.