Navigator.idl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. // https://html.spec.whatwg.org/multipage/system-state.html#navigator
  10. [Exposed=Window]
  11. interface Navigator {
  12. // objects implementing this interface also implement the interfaces given below
  13. // https://w3c.github.io/clipboard-apis/#navigator-interface
  14. [SecureContext, SameObject] readonly attribute Clipboard clipboard;
  15. };
  16. // NOTE: As NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, and NavigatorAutomationInformation
  17. // are not used in WorkerNavigator, we define them here.
  18. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorcontentutils
  19. interface mixin NavigatorContentUtils {
  20. // FIXME: [SecureContext] undefined registerProtocolHandler(DOMString scheme, USVString url);
  21. // FIXME: [SecureContext] undefined unregisterProtocolHandler(DOMString scheme, USVString url);
  22. };
  23. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorcookies
  24. interface mixin NavigatorCookies {
  25. readonly attribute boolean cookieEnabled;
  26. };
  27. // https://html.spec.whatwg.org/multipage/system-state.html#navigatorplugins
  28. interface mixin NavigatorPlugins {
  29. [SameObject] readonly attribute PluginArray plugins;
  30. [SameObject] readonly attribute MimeTypeArray mimeTypes;
  31. boolean javaEnabled();
  32. readonly attribute boolean pdfViewerEnabled;
  33. };
  34. // https://w3c.github.io/webdriver/#dom-navigatorautomationinformation
  35. interface mixin NavigatorAutomationInformation {
  36. readonly attribute boolean webdriver;
  37. };
  38. Navigator includes NavigatorBeacon;
  39. Navigator includes NavigatorID;
  40. Navigator includes NavigatorLanguage;
  41. Navigator includes NavigatorOnLine;
  42. Navigator includes NavigatorContentUtils;
  43. Navigator includes NavigatorCookies;
  44. Navigator includes NavigatorPlugins;
  45. Navigator includes NavigatorConcurrentHardware;
  46. Navigator includes NavigatorAutomationInformation;