|
@@ -25,12 +25,18 @@ import js.html.Storage;
|
|
|
import js.html.XMLHttpRequest;
|
|
|
|
|
|
class Browser {
|
|
|
+ public static var window(get, never):js.html.DOMWindow;
|
|
|
+ inline static function get_window() return untyped __js__("window");
|
|
|
|
|
|
- public static var window(default,null) : js.html.DOMWindow = untyped __js__("typeof window != \"undefined\" ? window : null");
|
|
|
- public static var document(default,null) : js.html.Document = untyped __js__("typeof window != \"undefined\" ? window.document : null");
|
|
|
- public static var location(default,null) : js.html.Location = untyped __js__("typeof window != \"undefined\" ? window.location : null");
|
|
|
- public static var navigator(default,null) : js.html.Navigator = untyped __js__("typeof window != \"undefined\" ? window.navigator : null");
|
|
|
+ public static var document(get, never):js.html.Document;
|
|
|
+ inline static function get_document() return untyped __js__("window.document");
|
|
|
|
|
|
+ public static var location(get, never):js.html.Location;
|
|
|
+ inline static function get_location() return untyped __js__("window.location");
|
|
|
+
|
|
|
+ public static var navigator(get, never):js.html.Navigator;
|
|
|
+ inline static function get_navigator() return untyped __js__("window.navigator");
|
|
|
+
|
|
|
/**
|
|
|
* Safely gets the browser's local storage, or returns null if localStorage is unsupported or
|
|
|
* disabled.
|