Navigator.idl 2.5 KB

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