StorageEvent: phương thức initStorageEvent()
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Phương thức StorageEvent.initStorageEvent() được dùng để khởi tạo giá trị của một StorageEvent.
Cú pháp
initStorageEvent(type)
initStorageEvent(type, canBubble)
initStorageEvent(type, canBubble, cancelable)
initStorageEvent(type, canBubble, cancelable, key)
initStorageEvent(type, canBubble, cancelable, key, oldValue)
initStorageEvent(type, canBubble, cancelable, key, oldValue, newValue)
initStorageEvent(type, canBubble, cancelable, key, oldValue, newValue, url)
initStorageEvent(type, canBubble, cancelable, key, oldValue, newValue, url, storageArea)
Tham số
typeArg-
Tên của sự kiện.
canBubbleOptional-
Một giá trị boolean cho biết sự kiện có nổi lên qua DOM hay không.
cancelableOptional-
Một giá trị boolean cho biết sự kiện có thể bị hủy hay không.
keyOptional-
Khóa mà giá trị của nó đang thay đổi do sự kiện này.
oldValueOptional-
Giá trị cũ của khóa.
newValueOptional-
Giá trị mới của khóa.
urlOptional-
URL của tài liệu khởi tạo thay đổi.
storageAreaOptional-
Đối tượng
Storageđại diện cho vùng lưu trữ mà sự kiện này xảy ra trên đó.
Giá trị trả về
Không có (undefined).
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| HTML> # dom-storageevent-initstorageevent> |
Tương thích trình duyệt
Xem thêm
- Web Storage API
- Constructor nên dùng thay cho phương thức deprecated này:
StorageEvent().