Bug 924682 - [Pure] getters for some often used attributes, r=bz

--HG--
extra : rebase_source : b77cb6514838e6f3489896eda905622e345fff9e
This commit is contained in:
Olli Pettay 2013-10-09 21:58:15 +03:00
Родитель ec4f05f29d
Коммит a0cb8012e2
3 изменённых файлов: 22 добавлений и 3 удалений

Просмотреть файл

@ -11,7 +11,9 @@
*/
interface CharacterData : Node {
[TreatNullAs=EmptyString,SetterThrows] attribute DOMString data;
[TreatNullAs=EmptyString, Pure, SetterThrows]
attribute DOMString data;
[Pure]
readonly attribute unsigned long length;
[Throws]
DOMString substringData(unsigned long offset, unsigned long count);

Просмотреть файл

@ -12,26 +12,34 @@
[Constructor(DOMString type, optional EventInit eventInitDict)]
interface Event {
[Pure]
readonly attribute DOMString type;
[Pure]
readonly attribute EventTarget? target;
[Pure]
readonly attribute EventTarget? currentTarget;
const unsigned short NONE = 0;
const unsigned short CAPTURING_PHASE = 1;
const unsigned short AT_TARGET = 2;
const unsigned short BUBBLING_PHASE = 3;
[Pure]
readonly attribute unsigned short eventPhase;
void stopPropagation();
void stopImmediatePropagation();
[Pure]
readonly attribute boolean bubbles;
[Pure]
readonly attribute boolean cancelable;
void preventDefault();
[Pure]
readonly attribute boolean defaultPrevented;
[Unforgeable]
[Unforgeable, Pure]
readonly attribute boolean isTrusted;
[Pure]
readonly attribute DOMTimeStamp timeStamp;
[Throws]

Просмотреть файл

@ -15,14 +15,21 @@ interface HTMLDocument : Document {
// DOM tree accessors
[Throws]
getter object (DOMString name);
[SetterThrows]
[Pure, SetterThrows]
attribute HTMLElement? body;
[Pure]
readonly attribute HTMLHeadElement? head;
[Pure]
readonly attribute HTMLCollection images;
[Pure]
readonly attribute HTMLCollection embeds;
[Pure]
readonly attribute HTMLCollection plugins;
[Pure]
readonly attribute HTMLCollection links;
[Pure]
readonly attribute HTMLCollection forms;
[Pure]
readonly attribute HTMLCollection scripts;
NodeList getElementsByName(DOMString elementName);
NodeList getItems(optional DOMString typeNames = ""); // microdata
@ -60,7 +67,9 @@ interface HTMLDocument : Document {
[TreatNullAs=EmptyString] attribute DOMString alinkColor;
[TreatNullAs=EmptyString] attribute DOMString bgColor;
[Pure]
readonly attribute HTMLCollection anchors;
[Pure]
readonly attribute HTMLCollection applets;
void clear();