SHARE
TWEET

Browser features description model

a guest Oct 7th, 2018 143 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Subject: Browser features description model
  2. //Project: Feature Policy ( https://github.com/WICG/feature-policy )
  3. //Also related to: https://github.com/w3c/WebAppSec
  4. //Author: would be anonymous
  5.  
  6. interface BrowserFeature
  7. {
  8.     boolean canAccessHardwareInfo;
  9.     boolean canAccessSoftwareInfo;
  10.     boolean canAccessLocalFilesystem;
  11.     boolean canAccessExternalData;
  12.     boolean canAccessNativeFunctions;
  13.     boolean requiresPlugins;
  14.     boolean isBrowserSpecific;
  15.     boolean hasOSSpecificImplementation;
  16.     DOMString name;
  17. };
  18.  
  19. interface NetworkFeature : BrowserFeature
  20. {
  21. };
  22.  
  23. interface ContentFeature : BrowserFeature
  24. {
  25.     sequence<DOMString> associatedMIMETypes;
  26.     sequence<DOMString> associatedTagNames;
  27.     sequence<DOMString> associatedAttributes;
  28.     sequence<DOMString> associatedDOMProperties;
  29. };
  30.  
  31. interface ProtocolSpecificNetworkFeature : NetworkFeature
  32. {
  33.     sequence<DOMString> associatedURISchemes;
  34. };
  35.  
  36. interface ProtocolHeaderFeature : ProtocolSpecificNetworkFeature
  37. {
  38.     sequence<DOMString> associatedHeaderNames;
  39. };
  40.  
  41. interface ContentNetworkFeature : ContentFeature, NetworkFeature
  42. {
  43. }
  44.  
  45. interface CSSFeature : ContentFeature
  46. {
  47.     sequence<DOMString> associatedCSSProperties;
  48. };
  49.  
  50. interface FeaturePermissionRule
  51. {
  52.     BrowserFeature feature;
  53.     getter boolean allowed(DOMString propertyName);
  54. };
  55.  
  56. interface NetworkFeaturePermissionRule : FeaturePermissionRule
  57. {
  58.     NetworkFeature feature;
  59.     DOMString contentRequestMethod;
  60.     DOMString contentMIMETypeMask;
  61.     DOMString contentSourceURIMask;
  62.     DOMString originDomain;
  63.     int originPort;
  64.     DOMString originScheme;
  65.     int frameNestingLevel;
  66. };
  67.  
  68. interface ScriptContext
  69. {
  70.     sequence<FeaturePermissionRule> featurePermissionRules;
  71.     sequence<HTMLScriptElement> scripts;
  72.     boolean derivePermissionRulesFromDocument;
  73. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top