L79-84 checks that if a property does not exist in proxy target it return undefined for the configuration of the property and Object.keys(window.sessionStorage, '<existent_property_key>') returns { configurable: true, /** truncated for brevity */ } on the browser (Tested on MS Edge 124).
Background
This fixes #1418.
L79-84
checks that if a property does not exist in proxy target it returnundefined
for the configuration of the property andObject.keys(window.sessionStorage, '<existent_property_key>')
returns{ configurable: true, /** truncated for brevity */ }
on the browser (Tested on MS Edge 124).https://github.com/capricorn86/happy-dom/blob/c29f36c5644eacd0546b5c302ecd6bd7feacf50f/packages/happy-dom/src/storage/StorageFactory.ts#L78-L92
Changes
Object.{entries,keys,values}()
throwingTypeError
onStorage
by setting{ configurable: true }
for all existent property in theStorage