Windows 7 (64-bit)
Pale Moon desktop version 28.12.0 (64-bit)
PC Hardware
CPU: AMD A8-5600k
RAM: 16GB
GPU: AMD Radeon R9 200
Description
When running in Pale Moon, JavaScript detects the existence of this function:
Code: Select all
window.localStorage.setItem( "myVar", "myValue" );
But local storage has an alternative syntax which does work in Pale Moon, and most other browsers.
Code: Select all
window.localStorage.myVar = "myValue";
Unknown Bug?
The Bugzilla forum seems to have hundreds of reports about various localStorage issues over the past decade, but I didn't notice any discussing setItem() specifically. It's hard to be certain. That said, I did not encounter this behavior in the 3-year-old version of Firefox that I also tested it with.
Repeatable Steps
Try to set a string value using
Code: Select all
window.localStorage.setItem( "myVar", "myValue" );
Try to set a string value using
Code: Select all
window.localStorage.myVar = "myValue";
Expected Result
Both of these should produce the same result: Storing a string in Local Storage.
Code: Select all
window.localStorage.setItem( "myVar", "myValue" );
Code: Select all
window.localStorage.myVar = "myValue";
Actual Result
Does not create nor modify any value.
Code: Select all
window.localStorage.setItem( "myVar", "myValue" );
Code: Select all
window.localStorage.myVar = "myValue";