v158 · html · a / area / form
Declarative windowfeatures
A click handler calling window.open() throws away middle-click, the context menu and every other native link behaviour. So the proposal adds a windowfeatures content attribute to <a>, <area> and <form>, reflected as windowFeatures. Presentation comes from windowfeatures; the opener relationship still comes from rel.
1 · Reflection lab
Per the WPT, the IDL attribute must default to "", mirror the content attribute, and write it back. In an engine without the feature the IDL read is undefined and an IDL write is only a JavaScript expando — the attribute stays absent.
2 · Real links
These are ordinary markup. Activate them normally (Enter, click, middle-click, context menu). Each opens the report pane, which posts back whether it has an opener and whether it landed in a popup.
-
Read beside (rel=opener)
<a href="…" target="_blank" rel="opener" windowfeatures="split,splitposition=right,splitsize=40"> -
Read beside (default rel)
<a href="…" target="_blank" windowfeatures="split"> <!-- target=_blank implies noopener: no handle, no opener --> -
No target attribute
<a href="…" rel="opener" windowfeatures="split"> <!-- split-aware: target="_blank" is implied. legacy: the attribute is ignored and THIS tab navigates. --> -
<area href="…" target="_blank" rel="opener" windowfeatures="split" alt="…"> -
<form action="…" target="_blank" rel="opener" windowfeatures="split,splitsize=35"> <!-- target kept so legacy engines open a tab instead of replacing this page; the split-aware engine would imply it --> -
Open into the named frame
<iframe name="decl-frame"> … <a target="decl-frame" windowfeatures="split"> <!-- an existing named navigable wins: features ignored -->
which features the attribute accepts
split, splitposition, splitsize, popup, width/height and left/top. noopener/noreferrer are refused (use rel), and the legacy toolbar/menubar/… tokens are ignored — so windowfeatures="toolbar=0,menubar=0" does not trigger the popup heuristic the way the same string does in window.open().
see also
- Opening links in a split tab — feature index
- Search results side-by-side — the attribute in a product
- ChromeStatus entry
- Explainer — Declarative form
- WPT: declarative-windowfeatures.tentative.html