Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HTMLImageElement IDL to latest version from gecko #1842

Merged
merged 2 commits into from
Oct 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions crates/web-sys/webidls/enabled/HTMLImageElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ interface URI;
interface nsIStreamListener;
*/

[HTMLConstructor,
NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
[NamedConstructor=Image(optional unsigned long width, optional unsigned long height),
Exposed=Window]
interface HTMLImageElement : HTMLElement {
[HTMLConstructor] constructor();

[CEReactions, SetterThrows]
attribute DOMString alt;
[CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
Expand All @@ -39,9 +41,13 @@ interface HTMLImageElement : HTMLElement {
attribute unsigned long width;
[CEReactions, SetterThrows]
attribute unsigned long height;
[CEReactions, SetterThrows]
attribute DOMString decoding;
readonly attribute unsigned long naturalWidth;
readonly attribute unsigned long naturalHeight;
readonly attribute boolean complete;
[NewObject]
Promise<void> decode();
};

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

[CEReactions, TreatNullAs=EmptyString,SetterThrows] attribute DOMString border;
[CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString border;
};

// [Update me: not in whatwg spec yet]
Expand Down