-
Notifications
You must be signed in to change notification settings - Fork 16
Refactor MapML elements as custom elements #511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just noting that IMO the situation regarding "custom" attributes vs |
Yes, for now we'll focus on elements. What's your opinion on the |
All MapML elements must contain a hyphen, so it'd be Edit: well, assuming nobody serves .mapml files with content-type |
Ok, I went with We'll need to explain this somehow, perhaps in the MapML spec? |
I don't think there's a need to use a The intention is then that when the spec is mature and browsers are ready to implement it and the polyfill follows the spec exactly (the tipping point) we're safe to remove the hyphens because now the polyfill is guaranteed to match the behaviors of the standard. |
Fixed in c67198b. Thanks to everyone involved! |
Thanks to you, too, for motivating some change for the better. Hopefully any bugs are minor. |
Per #174, it seems like a best practice of Web platform speculative polyfills is to generate proposed new APIs in a separate namespace, so that the name of the polyfills doesn't collide with the eventual standard name.
For elements, that implies today that we should use custom elements, and if I understand correctly, probably also data- prefixed attributes. Customised built-in elements would be ideal for implementing proposed extensions of existing elements, while autonomous custom elements would better serve the use case of new elements. There is apparently a viable polyfill for customized built-in (is=), but unsure how it works. It may not be worth the trouble of using the polyfill, opting instead for a apec explanation of the intended name of the eventual element.
This issue is for discussion of how to approach this refactoring.
We'll also need to decide how to do this in the draft spec, so that it's clear whether a proposed.element is 'new', or an extension of an existing element.
Also see Maps4HTML/MapML-Specification#215 (comment)
The text was updated successfully, but these errors were encountered: