Skip to content

Commit 913fdbc

Browse files
TannerRogalskyalexcrichton
authored andcommitted
Update HTMLImageElement IDL to latest version from gecko (#1842)
* Update HTMLImageElement IDL to latest version from gecko * Remove Mozilla-specific extensions to HTMLImageElement IDL
1 parent 1f51831 commit 913fdbc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

crates/web-sys/webidls/enabled/HTMLImageElement.webidl

+9-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ interface URI;
1818
interface nsIStreamListener;
1919
*/
2020

21-
[HTMLConstructor,
22-
NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
21+
[NamedConstructor=Image(optional unsigned long width, optional unsigned long height),
22+
Exposed=Window]
2323
interface HTMLImageElement : HTMLElement {
24+
[HTMLConstructor] constructor();
25+
2426
[CEReactions, SetterThrows]
2527
attribute DOMString alt;
2628
[CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
@@ -39,9 +41,13 @@ interface HTMLImageElement : HTMLElement {
3941
attribute unsigned long width;
4042
[CEReactions, SetterThrows]
4143
attribute unsigned long height;
44+
[CEReactions, SetterThrows]
45+
attribute DOMString decoding;
4246
readonly attribute unsigned long naturalWidth;
4347
readonly attribute unsigned long naturalHeight;
4448
readonly attribute boolean complete;
49+
[NewObject]
50+
Promise<void> decode();
4551
};
4652

4753
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
@@ -57,7 +63,7 @@ partial interface HTMLImageElement {
5763
[CEReactions, SetterThrows]
5864
attribute DOMString longDesc;
5965

60-
[CEReactions, TreatNullAs=EmptyString,SetterThrows] attribute DOMString border;
66+
[CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString border;
6167
};
6268

6369
// [Update me: not in whatwg spec yet]

0 commit comments

Comments
 (0)