fune/dom/webidl/HTMLSourceElement.webidl
Boris Chiou b0e1f7a8ac Bug 1694741 - Part 1: Support width and height attributes in HTMLSourceElement's webidl. r=emilio
This also introduce a pref which protect these two attributes:
dom.picture_source_dimension_attributes.enabled.

These two dimension attributes will be mapped to the style of <img> elements
if the <source> element's parent is <picture>. This will be implemented
in the later patch. For now, we just implement the DOM interface.

Differential Revision: https://phabricator.services.mozilla.com/D152585
2022-08-22 20:18:37 +00:00

37 lines
1.5 KiB
Text

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://www.whatwg.org/specs/web-apps/current-work/#the-source-element
*
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
* Opera Software ASA. You are granted a license to use, reproduce
* and create derivative works of this document.
*/
[Exposed=Window]
interface HTMLSourceElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
attribute DOMString src;
[CEReactions, SetterThrows]
attribute DOMString type;
};
partial interface HTMLSourceElement {
[CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
attribute DOMString srcset;
[CEReactions, SetterThrows]
attribute DOMString sizes;
[CEReactions, SetterThrows]
attribute DOMString media;
[CEReactions, SetterThrows,
Pref="dom.picture_source_dimension_attributes.enabled"]
attribute unsigned long width;
[CEReactions, SetterThrows,
Pref="dom.picture_source_dimension_attributes.enabled"]
attribute unsigned long height;
};