HTML might be getting a new type of tag, which… hasn't happened this millennium.
-
HTML might be getting a new type of tag, which… hasn't happened this millennium. Here's the new syntax, and how it works.
And here's the explainer on HTML patching https://github.com/WICG/declarative-partial-updates/blob/main/patching-explainer.md
@firefoxwebdevs Please don’t borrow XML processing instruction syntax only halfway. Either use PI syntax exactly, or invent a clearly different one.
-
HTML might be getting a new type of tag, which… hasn't happened this millennium. Here's the new syntax, and how it works.
And here's the explainer on HTML patching https://github.com/WICG/declarative-partial-updates/blob/main/patching-explainer.md
@firefoxwebdevs @jaffathecake How would out-of-order HTML patching work with a start/end processing instruction node pair with different parent elements? In the last example, what would happen to the closing em tag when HTML was patched?
-
@firefoxwebdevs Please don’t borrow XML processing instruction syntax only halfway. Either use PI syntax exactly, or invent a clearly different one.
@ujay68 what's missing from the current handling? The ProcessingInstruction 'class' should get new capabilities as a result of this, such as proper attributes.
-
@firefoxwebdevs @jaffathecake How would out-of-order HTML patching work with a start/end processing instruction node pair with different parent elements? In the last example, what would happen to the closing em tag when HTML was patched?
@timsev @jaffathecake currently, it wouldn't. The plan is, for that feature, to require the markers to be direct children of the parent with the marker attribute.
-
@ujay68 what's missing from the current handling? The ProcessingInstruction 'class' should get new capabilities as a result of this, such as proper attributes.
@firefoxwebdevs @ujay68 I think they meant being able to omit the question mark in "?>". Personally, I don't mind it, because HTML is not XML; for example, the slash in "<br/>" is also optional. The "<?" syntax seems to be chosen partly because it is backwards compatible, for which the closing "?" doesn't matter, since bogus comments end at the nearest ">". Either way, the closing question mark is allowed, so write it if you'd like! Jake even uses "?>" throughout the rest of the video

-
HTML might be getting a new type of tag, which… hasn't happened this millennium. Here's the new syntax, and how it works.
And here's the explainer on HTML patching https://github.com/WICG/declarative-partial-updates/blob/main/patching-explainer.md
@firefoxwebdevs cool stuff, Jake! I'm wondering, though - if these nodes are represented in the DOM as PI nodes, assuming I don't go "through" element nodes (like you showed with the em) is there a benefit of using these processing instructions over spans for syntax highlighting? Is it that the PIs have a smaller memory footprint? Or is there specific optimizations that can be done?
-
@firefoxwebdevs cool stuff, Jake! I'm wondering, though - if these nodes are represented in the DOM as PI nodes, assuming I don't go "through" element nodes (like you showed with the em) is there a benefit of using these processing instructions over spans for syntax highlighting? Is it that the PIs have a smaller memory footprint? Or is there specific optimizations that can be done?
@vrugtehagel there are some specific optimisations. The styling of highlights is limited - you can't impact layout, so that's an optimisation path.
-
@firefoxwebdevs @ujay68 I think they meant being able to omit the question mark in "?>". Personally, I don't mind it, because HTML is not XML; for example, the slash in "<br/>" is also optional. The "<?" syntax seems to be chosen partly because it is backwards compatible, for which the closing "?" doesn't matter, since bogus comments end at the nearest ">". Either way, the closing question mark is allowed, so write it if you'd like! Jake even uses "?>" throughout the rest of the video

@vrugtehagel @ujay68 haha yeah, the syntax highlighter I'm using didn't like the missing ? at the end. Well spotted!
-
@firefoxwebdevs @ujay68 I think they meant being able to omit the question mark in "?>". Personally, I don't mind it, because HTML is not XML; for example, the slash in "<br/>" is also optional. The "<?" syntax seems to be chosen partly because it is backwards compatible, for which the closing "?" doesn't matter, since bogus comments end at the nearest ">". Either way, the closing question mark is allowed, so write it if you'd like! Jake even uses "?>" throughout the rest of the video

@vrugtehagel @firefoxwebdevs Yes, this is what I meant. I’ve checked the HTML specification and the <? syntax is there, defined “bogus comment” (!) up to there next closing >. This is already different from XML, sadly.
-
@vrugtehagel @firefoxwebdevs Yes, this is what I meant. I’ve checked the HTML specification and the <? syntax is there, defined “bogus comment” (!) up to there next closing >. This is already different from XML, sadly.
@ujay68 @vrugtehagel right, but the goal is not to have all HTML and XML syntax be treated as the same, it's to have some subset that works the same in both.
-
HTML might be getting a new type of tag, which… hasn't happened this millennium. Here's the new syntax, and how it works.
And here's the explainer on HTML patching https://github.com/WICG/declarative-partial-updates/blob/main/patching-explainer.md
@firefoxwebdevs ouch … last example invalidates fragments requirements, although I agree combined with CSS is powerful indeed