2
0

Navigator.hx 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * Copyright (C)2005-2017 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla\Navigator.webidl. Do not edit!
  23. package js.html;
  24. /**
  25. The `Navigator` interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities.
  26. Documentation [Navigator](https://developer.mozilla.org/en-US/docs/Web/API/Navigator) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Navigator$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/Navigator>
  28. **/
  29. @:native("Navigator")
  30. extern class Navigator
  31. {
  32. /**
  33. Returns a `Permissions` object that can be used to query and update permission status of APIs covered by the Permissions API.
  34. **/
  35. var permissions(default,null) : Permissions;
  36. var mimeTypes(default,null) : MimeTypeArray;
  37. var plugins(default,null) : PluginArray;
  38. /**
  39. Reports the value of the user's do-not-track preference. When this value is "yes", your web site or application should not track the user.
  40. **/
  41. var doNotTrack(default,null) : String;
  42. /**
  43. Returns a `BatteryManager` object you can use to get information about the battery charging status.
  44. **/
  45. var battery(default,null) : BatteryManager;
  46. var maxTouchPoints(default,null) : Int;
  47. /**
  48. Returns a string that represents the current operating system.
  49. **/
  50. var oscpu(default,null) : String;
  51. /**
  52. Returns the vendor name of the current browser (e.g., "Netscape6").
  53. **/
  54. var vendor(default,null) : String;
  55. /**
  56. Returns the vendor version number (e.g. "6.1").
  57. **/
  58. var vendorSub(default,null) : String;
  59. /**
  60. Returns the build number of the current browser (e.g., "20060909").
  61. **/
  62. var productSub(default,null) : String;
  63. /**
  64. Returns a boolean indicating whether cookies are enabled in the browser or not.
  65. **/
  66. var cookieEnabled(default,null) : Bool;
  67. var buildID(default,null) : String;
  68. var hardwareConcurrency(default,null) : Int;
  69. /**
  70. Returns a `Geolocation` object allowing accessing the location of the device.
  71. **/
  72. var geolocation(default,null) : Geolocation;
  73. var appCodeName(default,null) : String;
  74. var appName(default,null) : String;
  75. var appVersion(default,null) : String;
  76. var platform(default,null) : String;
  77. var userAgent(default,null) : String;
  78. var product(default,null) : String;
  79. var language(default,null) : String;
  80. var languages(default,null) : Array<String>;
  81. var onLine(default,null) : Bool;
  82. /** @throws DOMError */
  83. function getBattery() : Promise<BatteryManager>;
  84. @:overload( function( duration : Int ) : Bool {} )
  85. function vibrate( pattern : Array<Int> ) : Bool;
  86. /** @throws DOMError */
  87. function javaEnabled() : Bool;
  88. /** @throws DOMError */
  89. function getGamepads() : Array<Gamepad>;
  90. /** @throws DOMError */
  91. function sendBeacon( url : String, ?data : haxe.extern.EitherType<ArrayBufferView,haxe.extern.EitherType<Blob,haxe.extern.EitherType<String,FormData>>> ) : Bool;
  92. /** @throws DOMError */
  93. function registerProtocolHandler( scheme : String, url : String, title : String ) : Void;
  94. /** @throws DOMError */
  95. function registerContentHandler( mimeType : String, url : String, title : String ) : Void;
  96. function taintEnabled() : Bool;
  97. }