1) Fix security error for getAll in FireFox when there are foreign domain CSS files included
On big sites with dozens of CSS files included, where some of them are included from other domains, FireFox throws security error on getAll because jss traverses all available CSS files. To bypass this error and make it work in FireFox, I have added a second argument to getAll function: sheet_name, where consumers can optionally specify which CSS filename to take into account. This enables getAll to work on only one CSS file and thus to avoid security error.
2) FireFox adds properties that are undefined on read, which then crashes set function later on.
In a loop where one uses getAll to get data and then later set to create new data structures, in FireFox, jss was crashing because FireFox delivers a lot of properties with value 'undefined'.
Fixed:
1) Fix security error for
getAll
in FireFox when there are foreign domain CSS files included On big sites with dozens of CSS files included, where some of them are included from other domains, FireFox throws security error ongetAll
because jss traverses all available CSS files. To bypass this error and make it work in FireFox, I have added a second argument togetAll
function:sheet_name
, where consumers can optionally specify which CSS filename to take into account. This enablesgetAll
to work on only one CSS file and thus to avoid security error.2) FireFox adds properties that are undefined on read, which then crashes
set
function later on. In a loop where one usesgetAll
to get data and then laterset
to create new data structures, in FireFox, jss was crashing because FireFox delivers a lot of properties with value 'undefined'.