Browse Source

[js] make js.Browser inline methods extern

closes #6815
Simon Krajewski 7 năm trước cách đây
mục cha
commit
a8c3450116
1 tập tin đã thay đổi với 6 bổ sung6 xóa
  1. 6 6
      std/js/Browser.hx

+ 6 - 6
std/js/Browser.hx

@@ -27,23 +27,23 @@ import js.html.XMLHttpRequest;
 class Browser {
 class Browser {
 	/** The global window object. */
 	/** The global window object. */
 	public static var window(get, never):js.html.Window;
 	public static var window(get, never):js.html.Window;
-	inline static function get_window() return untyped __js__("window");
+	extern inline static function get_window() return untyped __js__("window");
 
 
 	/** Shortcut to Window.document. */
 	/** Shortcut to Window.document. */
 	public static var document(get, never):js.html.HTMLDocument;
 	public static var document(get, never):js.html.HTMLDocument;
-	inline static function get_document() return untyped __js__("window.document");
+	extern inline static function get_document() return untyped __js__("window.document");
 
 
 	/** Shortcut to Window.location. */
 	/** Shortcut to Window.location. */
 	public static var location(get, never):js.html.Location;
 	public static var location(get, never):js.html.Location;
-	inline static function get_location() return untyped __js__("window.location");
+	extern inline static function get_location() return untyped __js__("window.location");
 
 
 	/** Shortcut to Window.navigator. */
 	/** Shortcut to Window.navigator. */
 	public static var navigator(get, never):js.html.Navigator;
 	public static var navigator(get, never):js.html.Navigator;
-	inline static function get_navigator() return untyped __js__("window.navigator");
+	extern inline static function get_navigator() return untyped __js__("window.navigator");
 
 
 	/** Shortcut to Window.console. */
 	/** Shortcut to Window.console. */
 	public static var console(get, never):js.html.Console;
 	public static var console(get, never):js.html.Console;
-	inline static function get_console() return untyped __js__("window.console");
+	extern inline static function get_console() return untyped __js__("window.console");
 
 
 	/**
 	/**
 	 * True if a window object exists, false otherwise.
 	 * True if a window object exists, false otherwise.
@@ -52,7 +52,7 @@ class Browser {
 	 * environment such as node.js.
 	 * environment such as node.js.
 	 */
 	 */
 	public static var supported(get, never):Bool;
 	public static var supported(get, never):Bool;
-	inline static function get_supported() return js.Syntax.typeof(window) != "undefined";
+	extern inline static function get_supported() return js.Syntax.typeof(window) != "undefined";
 
 
 	/**
 	/**
 	 * 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