noopener
keyword for the
rel
属性在
<a>
,
<area>
,和
<form>
elements instructs the browser to navigate to the target resource without granting the new browsing context access to the document that opened it — by not setting the
Window.opener
property on the opened window (it returns
null
).
This is especially useful when opening untrusted links, in order to ensure they cannot tamper with the originating document via the
Window.opener
property (see
About rel=noopener
for more details), while still providing the
Referer
HTTP header (unless
noreferrer
is used as well).
Note that when
noopener
is used, nonempty target names other than
_top
,
_self
,和
_parent
are all treated like
_blank
in terms of deciding whether to open a new window/tab.
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'noopener' in that specification. |
实时标准 |
No compatibility data found. Please contribute data for "html.elements.link.a.noopener" (depth: 1) to the MDN 兼容性数据存储库 .