Navigator.idl 1.8 KB

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