| Index: lib/contentPolicy.js |
| =================================================================== |
| --- a/lib/contentPolicy.js |
| +++ b/lib/contentPolicy.js |
| @@ -55,27 +55,28 @@ var Policy = exports.Policy = |
| // Treat fetch() the same as XMLHttpRequest, |
| // it's essentially the same - merely a more modern API. |
| yield ["FETCH", "XMLHTTPREQUEST"]; |
| // Everything else is mapped to itself |
| for (let contentType of ["OTHER", "SCRIPT", "IMAGE", "STYLESHEET", "OBJECT", |
| "SUBDOCUMENT", "DOCUMENT", "XMLHTTPREQUEST", |
| "OBJECT_SUBREQUEST", "FONT", "MEDIA", "PING", |
| - "ELEMHIDE", "POPUP", "GENERICHIDE", "GENERICBLOCK"]) |
| + "WEBSOCKET", "ELEMHIDE", "POPUP", "GENERICHIDE", |
| + "GENERICBLOCK"]) |
| yield [contentType, contentType]; |
| }()), |
| /** |
| * Set of content types that aren't associated with a visual document area |
| * @type Set.<string> |
| */ |
| nonVisualTypes: new Set([ |
| "SCRIPT", "STYLESHEET", "XMLHTTPREQUEST", "OBJECT_SUBREQUEST", "FONT", |
| - "PING", "ELEMHIDE", "POPUP", "GENERICHIDE", "GENERICBLOCK" |
| + "PING", "WEBSOCKET", "ELEMHIDE", "POPUP", "GENERICHIDE", "GENERICBLOCK" |
| ]), |
| /** |
| * Map containing all schemes that should be ignored by content policy. |
| * @type Set.<string> |
| */ |
| whitelistSchemes: new Set(), |