diff --git a/source b/source index 1aeaaa86bc5..19bbb78f97d 100644 --- a/source +++ b/source @@ -2740,6 +2740,13 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute sequence of Unicode scalar values
[LegacyFactoryFunction]
[LegacyLenientThis]
[LegacyNullToEmptyString]
[LegacyOverrideBuiltIns]
[LegacyTreatNonObjectAsNull]
[LegacyUnenumerableNamedProperties]
[LegacyUnforgeable]
The Web IDL also defines the following types that are used in Web IDL fragments @@ -8905,10 +8912,10 @@ o.myself = o;
enum DocumentReadyState { "loading", "interactive", "complete" };
typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;
-[OverrideBuiltins]
+[LegacyOverrideBuiltIns]
partial interface Document {
// resource metadata management
- [PutForwards=href, Unforgeable] readonly attribute Location? location;
+ [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
attribute USVString domain;
readonly attribute USVString referrer;
attribute USVString cookie;
@@ -8949,7 +8956,7 @@ partial interface Document {
DOMString queryCommandValue(DOMString commandId);
// special event handler IDL attributes that only apply to Document objects
- [LenientThis] attribute EventHandler onreadystatechange;
+ [LegacyLenientThis] attribute EventHandler onreadystatechange;
// also has obsolete members
};
@@ -9562,7 +9569,7 @@ partial interface Document {
@@ -9855,7 +9862,7 @@ interface HTMLElement : Element {
[CEReactions] attribute boolean spellcheck;
[CEReactions] attribute DOMString autocapitalize;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString innerText;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString innerText;
ElementInternals attachInternals();
};
@@ -12106,7 +12113,7 @@ translate="no">HTML</span> markup.</p>
data-x="concept-DOMStringMap-element">associated element.
[Exposed=Window,
- OverrideBuiltins]
+ LegacyOverrideBuiltIns]
interface DOMStringMap {
getter DOMString (DOMString name);
[CEReactions] setter void (DOMString name, DOMString value);
@@ -25774,7 +25781,7 @@ interface HTMLSourceElement : HTMLElement {
DOM interface:
[Exposed=Window,
- NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
+ LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)]
interface HTMLImageElement : HTMLElement {
[HTMLConstructor] constructor();
@@ -31763,7 +31770,7 @@ zero or more track
elements, then
DOM interface:
[Exposed=Window,
- NamedConstructor=Audio(optional DOMString src)]
+ LegacyFactoryFunction=Audio(optional DOMString src)]
interface HTMLAudioElement : HTMLMediaElement {
[HTMLConstructor] constructor();
};
@@ -42085,8 +42092,8 @@ interface HTMLTableCellElement : HTMLElement {
DOM interface:
[Exposed=Window,
- OverrideBuiltins,
- LegacyUnenumerableNamedProperties]
+ LegacyOverrideBuiltIns,
+ LegacyUnenumerableNamedProperties]
interface HTMLFormElement : HTMLElement {
[HTMLConstructor] constructor();
@@ -42903,7 +42910,7 @@ interface HTMLInputElement : HTMLElement {
[CEReactions] attribute DOMString step;
[CEReactions] attribute DOMString type;
[CEReactions] attribute DOMString defaultValue;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString value;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString value;
attribute object? valueAsDate;
attribute unrestricted double valueAsNumber;
[CEReactions] attribute unsigned long width;
@@ -49945,7 +49952,7 @@ interface HTMLOptGroupElement : HTMLElement {
DOM interface:
[Exposed=Window,
- NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)]
+ LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false)]
interface HTMLOptionElement : HTMLElement {
[HTMLConstructor] constructor();
@@ -50232,7 +50239,7 @@ interface HTMLTextAreaElement : HTMLElement {
readonly attribute DOMString type;
[CEReactions] attribute DOMString defaultValue;
- attribute [TreatNullAs=EmptyString] DOMString value;
+ attribute [LegacyNullToEmptyString] DOMString value;
readonly attribute unsigned long textLength;
readonly attribute boolean willValidate;
@@ -59263,7 +59270,7 @@ interface mixin CanvasFillStrokeStyles {
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
- CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
+ CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition);
- [PutForwards=href, Unforgeable] readonly attribute Location location;
+ [PutForwards=href, LegacyUnforgeable] readonly attribute Location location;
readonly attribute History history;
readonly attribute CustomElementRegistry customElements;
[Replaceable] readonly attribute BarProp locationbar;
@@ -77658,11 +77665,11 @@ interface Window : Eve
// other browsing contexts
[Replaceable] readonly attribute WindowProxy frames;
[Replaceable] readonly attribute unsigned long length;
- [Unforgeable] readonly attribute WindowProxy? top;
+ [LegacyUnforgeable] readonly attribute WindowProxy? top;
attribute any opener;
[Replaceable] readonly attribute WindowProxy? parent;
readonly attribute Element? frameElement;
- WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank", optional [TreatNullAs=EmptyString] DOMString features = "");
+ WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank", optional [LegacyNullToEmptyString] DOMString features = "");
getter object (DOMString name);
// Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic
// object on the prototype chain. Indeed, this does not make the global object an exotic object.
@@ -80499,12 +80506,12 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
The addition of valueOf
and @@toPrimitive own
data properties, as well as the fact that all of Location
's IDL attributes are marked
- [Unforgeable]
, is required by legacy code that consulted the
- Location
interface, or stringified it, to determine the [LegacyUnforgeable]
, is required by legacy code that consulted
+ the Location
interface, or stringified it, to determine the document URL, and then used it in a security-sensitive way.
In particular, the valueOf
, @@toPrimitive, and [Unforgeable]
stringifier mitigations ensure that code such as foo[location] = bar
or location + ""
cannot be
+ data-x="">[LegacyUnforgeable]
stringifier mitigations ensure that code such as
+ foo[location] = bar
or location + ""
cannot be
misdirected.
@@ -80541,21 +80548,21 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
[Exposed=Window]
interface Location { // but see also additional creation steps and overridden internal methods
- [Unforgeable] stringifier attribute USVString href;
- [Unforgeable] readonly attribute USVString origin;
- [Unforgeable] attribute USVString protocol;
- [Unforgeable] attribute USVString host;
- [Unforgeable] attribute USVString hostname;
- [Unforgeable] attribute USVString port;
- [Unforgeable] attribute USVString pathname;
- [Unforgeable] attribute USVString search;
- [Unforgeable] attribute USVString hash;
-
- [Unforgeable] void assign(USVString url);
- [Unforgeable] void replace(USVString url);
- [Unforgeable] void reload();
-
- [Unforgeable, SameObject] readonly attribute DOMStringList ancestorOrigins;
+ [LegacyUnforgeable] stringifier attribute USVString href;
+ [LegacyUnforgeable] readonly attribute USVString origin;
+ [LegacyUnforgeable] attribute USVString protocol;
+ [LegacyUnforgeable] attribute USVString host;
+ [LegacyUnforgeable] attribute USVString hostname;
+ [LegacyUnforgeable] attribute USVString port;
+ [LegacyUnforgeable] attribute USVString pathname;
+ [LegacyUnforgeable] attribute USVString search;
+ [LegacyUnforgeable] attribute USVString hash;
+
+ [LegacyUnforgeable] void assign(USVString url);
+ [LegacyUnforgeable] void replace(USVString url);
+ [LegacyUnforgeable] void reload();
+
+ [LegacyUnforgeable, SameObject] readonly attribute DOMStringList ancestorOrigins;
};
@@ -90402,7 +90409,7 @@ dictionary PromiseRejectionEventInit : EventInit {
The EventHandler
callback function type represents a callback used for event
handlers. It is represented in Web IDL as follows:
- [TreatNonObjectAsNull]
+ [LegacyTreatNonObjectAsNull]
callback EventHandlerNonNull = any (Event event);
typedef EventHandlerNonNull? EventHandler;
@@ -90439,7 +90446,7 @@ typedef EventHandlerNonNull? EventHandler;
For historical reasons, the onerror
handler has different
arguments:
- [TreatNonObjectAsNull]
+ [LegacyTreatNonObjectAsNull]
callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long colno, optional any error);
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
@@ -90450,7 +90457,7 @@ typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
Similarly, the onbeforeunload
handler has a
different return value: it will be cast to a string.
- [TreatNonObjectAsNull]
+ [LegacyTreatNonObjectAsNull]
callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
@@ -90883,8 +90890,8 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEvent
attribute EventHandler onloadedmetadata;
attribute EventHandler onloadstart;
attribute EventHandler onmousedown;
- [LenientThis] attribute EventHandler onmouseenter;
- [LenientThis] attribute EventHandler onmouseleave;
+ [LegacyLenientThis] attribute EventHandler onmouseenter;
+ [LegacyLenientThis] attribute EventHandler onmouseleave;
attribute EventHandler onmousemove;
attribute EventHandler onmouseout;
attribute EventHandler onmouseover;
@@ -114244,8 +114251,8 @@ interface HTMLFrameElement : HTMLElement {
readonly attribute Document? contentDocument;
readonly attribute WindowProxy? contentWindow;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString marginHeight;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString marginWidth;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString marginHeight;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString marginWidth;
};
The name
, scrolling
, and src
IDL attributes of the frame
element must
@@ -114318,11 +114325,11 @@ interface HTMLFrameElement : HTMLElement {
partial interface HTMLBodyElement {
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString text;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString link;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString vLink;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString aLink;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString text;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString link;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString vLink;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString aLink;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
[CEReactions] attribute DOMString background;
};
@@ -114449,7 +114456,7 @@ interface HTMLDirectoryElement : HTMLElement {
interface HTMLFontElement : HTMLElement {
[HTMLConstructor] constructor();
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString color;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString color;
[CEReactions] attribute DOMString face;
[CEReactions] attribute DOMString size;
};
@@ -114510,8 +114517,8 @@ interface HTMLFontElement : HTMLElement {
[CEReactions] attribute DOMString frameBorder;
[CEReactions] attribute USVString longDesc;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString marginHeight;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString marginWidth;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString marginHeight;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString marginWidth;
};
The align
and scrolling
IDL attributes of the
@@ -114545,7 +114552,7 @@ interface HTMLFontElement : HTMLElement {
[CEReactions] attribute unsigned long vspace;
[CEReactions] attribute USVString longDesc;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString border;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString border;
};
The name
, align
, border
, hspace
, and vspace
IDL attributes of the img
element
@@ -114672,7 +114679,7 @@ interface HTMLFontElement : HTMLElement {
[CEReactions] attribute DOMString codeBase;
[CEReactions] attribute DOMString codeType;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString border;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString border;
};
The align
, archive
, border
, code
, declare
, hspace
, standby
, and vspace
IDL attributes of the object
@@ -114770,9 +114777,9 @@ interface HTMLFontElement : HTMLElement {
[CEReactions] attribute DOMString summary;
[CEReactions] attribute DOMString width;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString cellPadding;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString cellSpacing;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString cellPadding;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString cellSpacing;
};
The align
, border
, frame
, summary
, rules
, and width
, IDL attributes of the table
element
@@ -114828,7 +114835,7 @@ interface HTMLFontElement : HTMLElement {
[CEReactions] attribute boolean noWrap;
[CEReactions] attribute DOMString vAlign;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
};
The align
, axis
, height
, and width
IDL attributes of the td
and
@@ -114863,7 +114870,7 @@ interface HTMLFontElement : HTMLElement {
[CEReactions] attribute DOMString chOff;
[CEReactions] attribute DOMString vAlign;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
};
The align
IDL attribute of the tr
@@ -114904,11 +114911,11 @@ interface HTMLFontElement : HTMLElement {
partial interface Document {
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString fgColor;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString linkColor;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString vlinkColor;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString alinkColor;
- [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString fgColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString linkColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString vlinkColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString alinkColor;
+ [CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
[SameObject] readonly attribute HTMLCollection anchors;
[SameObject] readonly attribute HTMLCollection applets;