Beispiel #1
0
    def clear(self):
        from thug.DOM.W3C.Events.StorageEvent import StorageEvent

        super(Storage, self).clear()
        self.__init__()
        log.WebTracking.inspect_storage_clear(self)

        evtObject = StorageEvent('storage', log.DFT.window)
        evtObject.initStorageEvent('storage', False, False, None, None, None,
                                   log.DFT.window.url, self)

        log.DFT.handle_window_storage_event('onstorage', evtObject)
Beispiel #2
0
    def removeItem(self, key):
        from thug.DOM.W3C.Events.StorageEvent import StorageEvent

        oldvalue = self[key] if key in self else None
        super(Storage, self).__delitem__(key)
        log.WebTracking.inspect_storage_removeitem(self, key)

        evtObject = StorageEvent('storage', log.DFT.window)
        evtObject.initStorageEvent('storage', False, False, key, oldvalue,
                                   None, log.DFT.window.url, self)

        log.DFT.handle_window_storage_event('onstorage', evtObject)
Beispiel #3
0
    def setItem(self, key, value):
        from thug.DOM.W3C.Events.StorageEvent import StorageEvent

        oldvalue = self[key] if key in self else None
        super().__setitem__(key, value)
        log.WebTracking.inspect_storage_setitem(self, key, value)

        evtObject = StorageEvent()
        evtObject.initStorageEvent('storage',
                                   False,
                                   False,
                                   key,
                                   oldvalue,
                                   value,
                                   log.DFT.window.url,
                                   self)

        log.DFT.handle_window_storage_event('onstorage', evtObject)
Beispiel #4
0
    def clear(self):
        from thug.DOM.W3C.Events.StorageEvent import StorageEvent

        super(Storage, self).clear()
        self.__init__()
        log.WebTracking.inspect_storage_clear(self)

        evtObject = StorageEvent()
        evtObject.initStorageEvent('storage',
                                   False,
                                   False,
                                   None,
                                   None,
                                   None,
                                   log.DFT.window.url,
                                   self)

        log.DFT.handle_window_storage_event('onstorage', evtObject)
Beispiel #5
0
    def removeItem(self, key):
        from thug.DOM.W3C.Events.StorageEvent import StorageEvent

        oldvalue = self[key] if key in self else None
        super(Storage, self).__delitem__(key)
        log.WebTracking.inspect_storage_removeitem(self, key)

        evtObject = StorageEvent()
        evtObject.initStorageEvent('storage',
                                   False,
                                   False,
                                   key,
                                   oldvalue,
                                   None,
                                   log.DFT.window.url,
                                   self)

        log.DFT.handle_window_storage_event('onstorage', evtObject)