Can't use Object.defineProperty() to add an item to a DOMStringMap or Storage
[WebKit-https.git] / Source / WebCore / storage / Storage.idl
index b193f86..8bbc03a 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-module storage {
+[
+    CustomEnumerateProperty,
+    GenerateIsReachable=ImplFrame,
+    SkipVTableValidation,
+] interface Storage {
+    [GetterMayThrowException] readonly attribute unsigned long length;
+    [MayThrowException] DOMString? key(unsigned long index);
+    [MayThrowException] getter DOMString? getItem(DOMString key);
+    [MayThrowException] setter void setItem(DOMString key, DOMString data);
+    [MayThrowException] deleter void removeItem(DOMString key);
+    [MayThrowException] void clear();
+};
 
-    interface [
-        HasNameGetter,
-        JSGenerateIsReachable=ImplFrame,
-        CustomDeleteProperty,
-        CustomGetPropertyNames,
-        DelegatingPutFunction,
-    ] Storage {
-        readonly attribute [NotEnumerable] unsigned long length;
-        [NotEnumerable, ConvertNullStringTo=Null] DOMString key(in unsigned long index);
-        [NotEnumerable, ConvertNullStringTo=Null] DOMString getItem(in DOMString key);
-        [NotEnumerable] void setItem(in DOMString key, in DOMString data) 
-            raises(DOMException);
-        [NotEnumerable] void removeItem(in DOMString key);
-        [NotEnumerable] void clear();
-    };
-
-}