diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/webidl/OfflineResourceList.webidl | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/webidl/OfflineResourceList.webidl')
-rw-r--r-- | dom/webidl/OfflineResourceList.webidl | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/dom/webidl/OfflineResourceList.webidl b/dom/webidl/OfflineResourceList.webidl new file mode 100644 index 000000000..abc511888 --- /dev/null +++ b/dom/webidl/OfflineResourceList.webidl @@ -0,0 +1,116 @@ +/* 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/. */ + +interface OfflineResourceList : EventTarget { + /** + * State of the application cache this object is associated with. + */ + + /* This object is not associated with an application cache. */ + const unsigned short UNCACHED = 0; + + /* The application cache is not being updated. */ + const unsigned short IDLE = 1; + + /* The manifest is being fetched and checked for updates */ + const unsigned short CHECKING = 2; + + /* Resources are being downloaded to be added to the cache */ + const unsigned short DOWNLOADING = 3; + + /* There is a new version of the application cache available */ + const unsigned short UPDATEREADY = 4; + + /* The application cache group is now obsolete. */ + const unsigned short OBSOLETE = 5; + + [Throws, UseCounter] + readonly attribute unsigned short status; + + /** + * Begin the application update process on the associated application cache. + */ + [Throws, UseCounter] + void update(); + + /** + * Swap in the newest version of the application cache, or disassociate + * from the cache if the cache group is obsolete. + */ + [Throws, UseCounter] + void swapCache(); + + /* Events */ + [UseCounter] + attribute EventHandler onchecking; + [UseCounter] + attribute EventHandler onerror; + [UseCounter] + attribute EventHandler onnoupdate; + [UseCounter] + attribute EventHandler ondownloading; + [UseCounter] + attribute EventHandler onprogress; + [UseCounter] + attribute EventHandler onupdateready; + [UseCounter] + attribute EventHandler oncached; + [UseCounter] + attribute EventHandler onobsolete; +}; + +// Mozilla extensions. +partial interface OfflineResourceList { + /** + * Get the list of dynamically-managed entries. + */ + [Throws] + readonly attribute DOMStringList mozItems; + + /** + * Check that an entry exists in the list of dynamically-managed entries. + * + * @param uri + * The resource to check. + */ + [Throws] + boolean mozHasItem(DOMString uri); + + /** + * Get the number of dynamically-managed entries. + * @status DEPRECATED + * Clients should use the "items" attribute. + */ + [Throws] + readonly attribute unsigned long mozLength; + + /** + * Get the URI of a dynamically-managed entry. + * @status DEPRECATED + * Clients should use the "items" attribute. + */ + [Throws] + getter DOMString mozItem(unsigned long index); + + /** + * Add an item to the list of dynamically-managed entries. The resource + * will be fetched into the application cache. + * + * @param uri + * The resource to add. + */ + [Throws] + void mozAdd(DOMString uri); + + /** + * Remove an item from the list of dynamically-managed entries. If this + * was the last reference to a URI in the application cache, the cache + * entry will be removed. + * + * @param uri + * The resource to remove. + */ + [Throws] + void mozRemove(DOMString uri); +}; |