Navigator.idl 1.9 KB

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