跳转到主内容

CustomScheme 对象

  • scheme 字符串 - 自定义的计划,可以被按选项注册。
  • privileges Object (可选)
    • standard boolean (可选) -默认为false
    • secure boolean (可选) - 默认为false
    • bypassCSP boolean (可选) - 默认为false
    • allowServiceWorkers boolean (可选) - 默认为false
    • supportFetchAPI boolean (可选) - 默认为false
    • corsEnabled boolean (optional) - Whether the scheme can be loaded across origins. When true, contents served over the scheme are readable from any origin, so only enable it for schemes whose contents are safe to expose. When false, the scheme can not be loaded across origins. 默认值:false。
    • stream boolean (可选) - 默认为 false.
    • codeCache boolean (可选) - 为该协议启用 V8 字节码缓存,仅在 standard 也设置为 true 时生效 。默认值:false。
    • allowExtensions boolean (optional) - Allow Chrome extensions to be used on pages served over this protocol. 默认值:false。