Navigator.idl 1.8 KB

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