Add HTMLDialogElement, HTMLPictureElement,, HTMLSlotElement#66
Add HTMLDialogElement, HTMLPictureElement,, HTMLSlotElement#66inkeliz wants to merge 5 commits intodominikh:masterfrom
Conversation
Add Element.Closest and Element.Matches
|
Thanks for working on this. I wanted to check if you had a need or use case for these, or if you were adding them just because they're missing? The general practice for this package to add support for missing DOM elements when someone has a concrete need. It's okay to leave things unimplemented until that need arises. That is especially helpful when it comes to the more esoteric and less widely supported DOM elements, since it's likely they become more well defined and easier to support by the time someone needs them. |
|
I'm currently using it, except the I don't use the The |
It's a basic implementation for
HTMLDialogElement,HTMLPictureElemenandHTMLSlotElement. I need to do more tests with the Slot. TheHTMLDialogElementis only supported on Chrome/Opera, right now.Because it's only supported by Chrome, if the developer strictly uses the
close()andshow()and not relies onmethod="dialog", it's possible make a simple polyfill, such as:Then, on CSS, do something like
dialog[open] { ... }, which will work in both cases.The
PictureElementhas nothing special.I need to test the
HTMLSlotElement, because it has. assignedNodes, but also have.assignedElementsandassignedSlot. The Mozilla page just say about.assignedNodes(), however.