|
@@ -72,7 +72,7 @@ class Browser {
|
|
public static var supported(get, never):Bool;
|
|
public static var supported(get, never):Bool;
|
|
|
|
|
|
static function get_supported()
|
|
static function get_supported()
|
|
- return
|
|
|
|
|
|
+ return
|
|
js.Syntax.typeof(window) != "undefined" &&
|
|
js.Syntax.typeof(window) != "undefined" &&
|
|
js.Syntax.typeof(window.location) != "undefined" &&
|
|
js.Syntax.typeof(window.location) != "undefined" &&
|
|
js.Syntax.typeof(window.location.protocol) == "string";
|
|
js.Syntax.typeof(window.location.protocol) == "string";
|
|
@@ -80,7 +80,7 @@ class Browser {
|
|
* Safely gets the browser's local storage, or returns null if localStorage is unsupported or
|
|
* Safely gets the browser's local storage, or returns null if localStorage is unsupported or
|
|
* disabled.
|
|
* disabled.
|
|
*/
|
|
*/
|
|
- public static function getLocalStorage():Storage {
|
|
|
|
|
|
+ public static function getLocalStorage():Null<Storage> {
|
|
try {
|
|
try {
|
|
var s = window.localStorage;
|
|
var s = window.localStorage;
|
|
s.getItem("");
|
|
s.getItem("");
|