html
html copied to clipboard
[portal tag] proposal to enable portal of element / text
A common practice to quote in the web is utilizing the blockquote and cite tags to present context as a quoted source.
When authoring articles, documentation in particular, there's often a need to refer a proxy or mutual member to a source from sub sections.
Best experience for a reader would be to read the context on the spot while knowing it is a portal to a different existing live source.
Let's say we document a popup
element class that is integrated within a menu
(menu
uses popup
under its hood).
when authoring a doc for each will first describe the source (popup
)
<h1>Popup</h1>
<h2>Open</h2>
<p>use the `open` attribute to set the popup open state.</p>
<ul>
<li>Type: boolean</li>
<li>Default: false</li>
</ul>
then in menu we will need to either:
- reference - link to the popup page source. tedious for user and breaks the reading flow
<h1>Popup</h1>
<h2>Open</h2>
<p>Delegates to the [open property in the underlying popup element](https://vivid.deno.dev/popup#open).</p>
<ul>
<li>Type: boolean</li>
<li>Default: false</li>
</ul>
- hardcode - repeat the same description (copy & paste). Requires maintenance and can be forgotten over time
<h1>Menu</h1>
<h2>Open</h2>
<p>use the `open` attribute to set the popup open state.</p>
<ul>
<li>Type: boolean</li>
<li>Default: false</li>
</ul>
A better experience for a reader would be to reflect the fact that the sub section is referring to a source GitHub are already featuring such a behavior by embedding permalinks
https://github.com/whatwg/html/blob/823a14b4353266c7885c7b06da0d6ba1e4f1bb20/README.md?plain=1#L5
we should be able to portal a window of specific area of html or text