Navigator.idl 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #import <Clipboard/Clipboard.idl>
  2. #import <HTML/MimeTypeArray.idl>
  3. #import <HTML/NavigatorBeacon.idl>
  4. #import <HTML/NavigatorConcurrentHardware.idl>
  5. #import <HTML/NavigatorDeviceMemory.idl>
  6. #import <HTML/NavigatorID.idl>
  7. #import <HTML/NavigatorLanguage.idl>
  8. #import <HTML/NavigatorOnLine.idl>
  9. #import <HTML/PluginArray.idl>
  10. #import <HTML/ServiceWorkerContainer.idl>
  11. #import <HTML/UserActivation.idl>
  12. #import <MediaCapabilitiesAPI/MediaCapabilities.idl>
  13. #import <StorageAPI/NavigatorStorage.idl>
  14. // https://html.spec.whatwg.org/multipage/system-state.html#navigator
  15. [Exposed=Window]
  16. interface Navigator {
  17. // objects implementing this interface also implement the interfaces given below
  18. // https://w3c.github.io/clipboard-apis/#navigator-interface
  19. [SecureContext, SameObject] readonly attribute Clipboard clipboard;
  20. // https://w3c.github.io/pointerevents/#extensions-to-the-navigator-interface
  21. readonly attribute long maxTouchPoints;
  22. // https://html.spec.whatwg.org/multipage/interaction.html#useractivation
  23. [SameObject] readonly attribute UserActivation userActivation;
  24. // https://www.w3.org/TR/tracking-dnt/#dom-navigator-donottrack
  25. readonly attribute DOMString? doNotTrack;
  26. // https://w3c.github.io/ServiceWorker/#navigator-serviceworker
  27. [SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
  28. // https://w3c.github.io/media-capabilities/#dom-navigator-mediacapabilities
  29. [SameObject] readonly attribute MediaCapabilities mediaCapabilities;
  30. };
  31. // NOTE: As NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, and NavigatorAutomationInformation
  32. // are not used in WorkerNavigator, we define them here.
  33. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorcontentutils
  34. interface mixin NavigatorContentUtils {
  35. [FIXME, SecureContext] undefined registerProtocolHandler(DOMString scheme, USVString url);
  36. [FIXME, SecureContext] undefined unregisterProtocolHandler(DOMString scheme, USVString url);
  37. };
  38. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorcookies
  39. interface mixin NavigatorCookies {
  40. readonly attribute boolean cookieEnabled;
  41. };
  42. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorplugins
  43. interface mixin NavigatorPlugins {
  44. [SameObject] readonly attribute PluginArray plugins;
  45. [SameObject] readonly attribute MimeTypeArray mimeTypes;
  46. boolean javaEnabled();
  47. readonly attribute boolean pdfViewerEnabled;
  48. };
  49. // https://w3c.github.io/webdriver/#dom-navigatorautomationinformation
  50. interface mixin NavigatorAutomationInformation {
  51. readonly attribute boolean webdriver;
  52. };
  53. Navigator includes NavigatorBeacon;
  54. Navigator includes NavigatorID;
  55. Navigator includes NavigatorLanguage;
  56. Navigator includes NavigatorOnLine;
  57. Navigator includes NavigatorContentUtils;
  58. Navigator includes NavigatorCookies;
  59. Navigator includes NavigatorPlugins;
  60. Navigator includes NavigatorConcurrentHardware;
  61. Navigator includes NavigatorAutomationInformation;
  62. Navigator includes NavigatorStorage;
  63. Navigator includes NavigatorDeviceMemory;