2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2014-07-23 09:07:12 +04:00
|
|
|
/* 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/html/#the-storage-interface
|
|
|
|
*
|
|
|
|
* © 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
interface Storage {
|
2016-10-03 17:10:27 +03:00
|
|
|
[Throws, NeedsSubjectPrincipal]
|
2014-07-23 09:07:12 +04:00
|
|
|
readonly attribute unsigned long length;
|
|
|
|
|
2016-10-03 17:10:27 +03:00
|
|
|
[Throws, NeedsSubjectPrincipal]
|
2014-07-23 09:07:12 +04:00
|
|
|
DOMString? key(unsigned long index);
|
|
|
|
|
2016-10-03 17:10:27 +03:00
|
|
|
[Throws, NeedsSubjectPrincipal]
|
2014-07-23 09:07:12 +04:00
|
|
|
getter DOMString? getItem(DOMString key);
|
|
|
|
|
2016-10-03 17:10:27 +03:00
|
|
|
[Throws, NeedsSubjectPrincipal]
|
2017-11-04 07:36:10 +03:00
|
|
|
setter void setItem(DOMString key, DOMString value);
|
2014-07-23 09:07:12 +04:00
|
|
|
|
2016-10-03 17:10:27 +03:00
|
|
|
[Throws, NeedsSubjectPrincipal]
|
2014-07-23 09:07:12 +04:00
|
|
|
deleter void removeItem(DOMString key);
|
|
|
|
|
2016-10-03 17:10:27 +03:00
|
|
|
[Throws, NeedsSubjectPrincipal]
|
2014-07-23 09:07:12 +04:00
|
|
|
void clear();
|
2015-12-09 23:47:53 +03:00
|
|
|
|
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean isSessionOnly;
|
2014-07-23 09:07:12 +04:00
|
|
|
};
|
2018-11-29 23:48:11 +03:00
|
|
|
|
|
|
|
// Testing only.
|
|
|
|
partial interface Storage {
|
|
|
|
[Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
|
|
|
|
void open();
|
|
|
|
|
|
|
|
[Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
|
|
|
|
void close();
|
2018-11-29 23:48:54 +03:00
|
|
|
|
|
|
|
[Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
|
|
|
|
void beginExplicitSnapshot();
|
|
|
|
|
|
|
|
[Throws, NeedsSubjectPrincipal, Pref="dom.storage.testing"]
|
|
|
|
void endExplicitSnapshot();
|
2018-11-29 23:48:11 +03:00
|
|
|
};
|