Commit 052df2b3 authored by Boris Zbarsky's avatar Boris Zbarsky
Browse files

Bug 1104955 part 1. Add parsing for [Unscopeable] in IDL. r=khuey

parent 6f772d47
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -4108,6 +4108,14 @@ class IDLAttribute(IDLInterfaceMember):
                raise WebIDLError("[UseCounter] must not be used on a "
                                  "stringifier attribute",
                                  [attr.location, self.location])
        elif identifier == "Unscopable":
            if not attr.noArguments():
                raise WebIDLError("[Unscopable] must take no arguments",
                                  [attr.location])
            if self.isStatic():
                raise WebIDLError("[Unscopable] is only allowed on non-static "
                                  "attributes and operations",
                                  [attr.location, self.location])
        elif (identifier == "Pref" or
              identifier == "Deprecated" or
              identifier == "SetterThrows" or
@@ -4808,6 +4816,14 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
                raise WebIDLError("[UseCounter] must not be used on a special "
                                  "operation",
                                  [attr.location, self.location])
        elif identifier == "Unscopable":
            if not attr.noArguments():
                raise WebIDLError("[Unscopable] must take no arguments",
                                  [attr.location])
            if self.isStatic():
                raise WebIDLError("[Unscopable] is only allowed on non-static "
                                  "attributes and operations",
                                  [attr.location, self.location])
        elif (identifier == "Throws" or
              identifier == "NewObject" or
              identifier == "ChromeOnly" or
+4 −0
Original line number Diff line number Diff line
@@ -10,9 +10,13 @@
[NoInterfaceObject]
interface ChildNode {
// Not implemented yet:
//  [Unscopable]
//  void before((Node or DOMString)... nodes);
//  [Unscopable]
//  void after((Node or DOMString)... nodes);
//  [Unscopable]
//  void replace((Node or DOMString)... nodes);
  [Unscopable]
  void remove();
};