Navigator.idl 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. };
  21. // NOTE: As NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, and NavigatorAutomationInformation
  22. // are not used in WorkerNavigator, we define them here.
  23. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorcontentutils
  24. interface mixin NavigatorContentUtils {
  25. [FIXME, SecureContext] undefined registerProtocolHandler(DOMString scheme, USVString url);
  26. [FIXME, SecureContext] undefined unregisterProtocolHandler(DOMString scheme, USVString url);
  27. };
  28. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorcookies
  29. interface mixin NavigatorCookies {
  30. readonly attribute boolean cookieEnabled;
  31. };
  32. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorplugins
  33. interface mixin NavigatorPlugins {
  34. [SameObject] readonly attribute PluginArray plugins;
  35. [SameObject] readonly attribute MimeTypeArray mimeTypes;
  36. boolean javaEnabled();
  37. readonly attribute boolean pdfViewerEnabled;
  38. };
  39. // https://w3c.github.io/webdriver/#dom-navigatorautomationinformation
  40. interface mixin NavigatorAutomationInformation {
  41. readonly attribute boolean webdriver;
  42. };
  43. Navigator includes NavigatorBeacon;
  44. Navigator includes NavigatorID;
  45. Navigator includes NavigatorLanguage;
  46. Navigator includes NavigatorOnLine;
  47. Navigator includes NavigatorContentUtils;
  48. Navigator includes NavigatorCookies;
  49. Navigator includes NavigatorPlugins;
  50. Navigator includes NavigatorConcurrentHardware;
  51. Navigator includes NavigatorAutomationInformation;