diff --git a/source b/source index ec7db8fca23..47da9bd0968 100755 --- a/source +++ b/source @@ -3060,6 +3060,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • The eval() function
  • The [[IsHTMLDDA]] internal slot
  • The typeof operator
  • +
  • The delete operator
  • The TypedArray Constructors table
  • @@ -98129,7 +98130,7 @@ interface WorkerLocation { -->

    The second storage mechanism is designed for storage that spans multiple windows, and lasts - beyond the current session. In particular, Web applications may wish to store megabytes of user + beyond the current session. In particular, Web applications might wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons.

    @@ -98197,6 +98198,53 @@ interface Storage { implementing the Storage interface can all be associated with the same list of key/value pairs simultaneously.

    +
    + +
    storage . length
    +
    +

    Returns the number of key/value pairs currently present in the list associated with the + object.

    +
    + +
    storage . key ( n )
    +
    +

    Returns the name of the nth key in the list, or null if n is greater + than or equal to the number of key/value pairs in the object.

    +
    + +
    value = storage . getItem ( key )
    +
    value = storage[key]
    +
    +

    Returns the current value associated with the given key, or null if the given + key does not exist in the list associated with the object.

    +
    + +
    storage . setItem ( key, value )
    +
    storage[key] = value
    +
    +

    Sets the value of the pair identified by key to value, creating a new + key/value pair if none existed for key previously.

    + +

    Throws a "QuotaExceededError" DOMException exception + if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage + for the site, or if the quota has been exceeded.)

    + +
    storage . removeItem ( key )
    +
    delete storage[key]
    +
    +

    Removes the key/value pair with the given key from the list associated with the + object, if a key/value pair with the given key exists.

    +
    + +
    storage . clear()
    +
    +

    Empties the list associated with the object of all key/value pairs, if there are any.

    +
    + +
    + +
    +

    The length attribute must return the number of key/value pairs currently present in the list associated with the object.

    @@ -98228,8 +98276,7 @@ interface Storage { the method must do nothing.

    If it couldn't set the new value, the method must throw a - "QuotaExceededError" DOMException exception. (Setting could - fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)

    + "QuotaExceededError" DOMException exception.

    The removeItem(key) method must cause the key/value pair with the given key to be removed from the @@ -98245,6 +98292,8 @@ interface Storage { list associated with the object to be emptied of all key/value pairs, if there are any. If there are none, then the method must do nothing.

    +
    +

    When the setItem(), removeItem(), and clear() methods are invoked, events are fired on the @@ -98271,6 +98320,14 @@ interface WindowSessionStorage {

    The sessionStorage attribute represents the set of storage areas specific to the current top-level browsing context.

    +
    +
    window . sessionStorage
    +
    +

    Returns the Storage object associated with that origin's session storage + area.

    +
    +
    +

    Each top-level browsing context has a unique set of session storage areas, one for each origin.

    @@ -98282,6 +98339,8 @@ interface WindowSessionStorage { be discarded with it, as the API described in this specification provides no way for that data to ever be subsequently retrieved.

    +
    +

    The lifetime of a browsing context can be unrelated to the lifetime of the actual user agent process itself, as the user agent can support resuming sessions after a restart.

    @@ -98298,19 +98357,21 @@ interface WindowSessionStorage {

    The sessionStorage attribute must return a Storage object associated with the Document's assigned session storage - area, if any, or null if there isn't one. Each Document object must have a separate - object for its Window's sessionStorage - attribute.

    + area. Each Document object must have a separate object for its Window's + sessionStorage attribute.

    While creating a new browsing context, the session storage area is sometimes copied over.

    +
    +

    When the setItem(), removeItem(), and clear() methods are called on a Storage object x that is associated with a session storage area, if the methods did not throw an exception or "do nothing" as defined above, then for every Document object whose Window object's sessionStorage attribute's - Storage object is associated with the same storage area, other than x, send a storage notification.

    + Storage object is associated with the same storage area, other than x, + user agents send a storage notification.

    The localStorage attribute

    @@ -98327,6 +98388,20 @@ interface WindowLocalStorage {

    +
    +
    window . localStorage
    +
    +

    Returns the Storage object associated with that origin's local storage + area.

    +

    Throws a "SecurityError" DOMException if the + Document's origin is an opaque + origin or if the request violates a policy decision (e.g. if the user agent is + configured to not allow the page to persist data).

    +
    +
    + +
    +

    User agents must have a set of local storage areas, one for each origin.

    User agents should expire data from the local storage areas only for security reasons or when @@ -98341,10 +98416,10 @@ interface WindowLocalStorage {

      -
    1. The user agent may throw a "SecurityError" - DOMException instead of returning a Storage - object if the request violates a policy decisions (e.g. if the user agent is configured to not - allow the page to persist data).

    2. +
    3. If the request violates a policy decision (e.g. if the user agent is configured to not + allow the page to persist data), the user agent may throw a + "SecurityError" DOMException instead of returning a + Storage object

    4. If the Document's origin is an opaque origin, then throw a @@ -98361,12 +98436,15 @@ interface WindowLocalStorage {

    +
    +

    When the setItem(), removeItem(), and clear() methods are called on a Storage object x that is associated with a local storage area, if the methods did not throw an exception or "do nothing" as defined above, then for every Document object whose Window object's localStorage attribute's - Storage object is associated with the same storage area, other than x, send a storage notification. + Storage object is associated with the same storage area, other than x, + user agents send a storage notification.

    The localStorage attribute provides access to shared state. This specification does not define the interaction with other browsing @@ -98379,10 +98457,13 @@ interface WindowLocalStorage {

    The storage event

    -

    The storage event is fired on a Document's - Window object when a storage area changes, as described in the previous two sections - (for session storage, for local - storage).

    +

    The storage event is fired on a Document's + Window object when a storage area changes, as described in the previous two + sections (for session storage, for + local storage).

    + +

    When a user agent is to send a storage notification for a Document, the user agent must queue a task to fire an @@ -98418,6 +98499,8 @@ interface WindowLocalStorage { Document that represents the same kind of Storage area as was affected (i.e. session or local).

    +
    +
    The StorageEvent interface
    @@ -98439,21 +98522,50 @@ dictionary StorageEventInit : EventInit { Storage? storageArea = null; }; -

    The key attribute must return the value - it was initialized to. It represents the key being changed.

    +
    -

    The oldValue attribute must return - the value it was initialized to. It represents the old value of the key being changed.

    +
    event . key
    -

    The newValue attribute must return - the value it was initialized to. It represents the new value of the key being changed.

    +
    +

    Returns the key of the storage item being changed.

    +
    + +
    event . oldValue
    + +
    +

    Returns the old value of the key of the storage item whose value is being changed.

    +
    -

    The url attribute must return the value - it was initialized to. It represents the URL of the document whose key changed.

    +
    event . newValue
    -

    The storageArea attribute must - return the value it was initialized to. It represents the Storage object that was - affected.

    +
    +

    Returns the new value of the key of the storage item whose value is being changed.

    +
    + +
    event . url
    + +
    +

    Returns the URL of the document whose storage item changed.

    +
    + +
    event . storageArea
    + +
    +

    Returns the Storage object that was affected.

    +
    + +
    + +
    + +

    The key, oldValue, newValue, url, and storageArea attributes must return the values + they were initialized to.

    + +

    Disk space

    @@ -98585,6 +98697,7 @@ dictionary StorageEventInit : EventInit { user-specific data (e.g. user-agent headers and configuration settings) to combine separate sessions into coherent user profiles.

    +

    Sensitivity of data

    @@ -98595,6 +98708,8 @@ dictionary StorageEventInit : EventInit {

    To this end, user agents should ensure that when deleting data, it is promptly deleted from the underlying storage.

    +
    +

    Security

    @@ -98620,6 +98735,8 @@ dictionary StorageEventInit : EventInit { path.

    +
    +

    Implementation risks

    The two primary risks when implementing these persistent storage features are letting hostile @@ -98640,6 +98757,8 @@ dictionary StorageEventInit : EventInit { important for user security.

    +
    +

    The HTML syntax