Only expose Storage/StorageEvent in Window

This commit is contained in:
Javier Rueda 2017-02-09 15:28:12 +01:00
parent f7e75fd001
commit 1aeca9c255
7 changed files with 10 additions and 13 deletions

View file

@ -469,12 +469,12 @@ impl WindowMethods for Window {
// https://html.spec.whatwg.org/multipage/#dom-sessionstorage
fn SessionStorage(&self) -> Root<Storage> {
self.session_storage.or_init(|| Storage::new(self.upcast(), StorageType::Session))
self.session_storage.or_init(|| Storage::new(self, StorageType::Session))
}
// https://html.spec.whatwg.org/multipage/#dom-localstorage
fn LocalStorage(&self) -> Root<Storage> {
self.local_storage.or_init(|| Storage::new(self.upcast(), StorageType::Local))
self.local_storage.or_init(|| Storage::new(self, StorageType::Local))
}
// https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#dfn-GlobalCrypto