Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit bb7af18

Browse files
committed
update to CSP entry and why it can fail
1 parent 82dbdae commit bb7af18

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

faq.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,14 @@ for developers that includes all of the the pieces for building
110110

111111
### Does {{site.project_title}} work under Content Security Policy (CSP)? {#csp}
112112

113-
In certain cases, {{site.project_title}} fails under certain [CSP](http://www.html5rocks.com/tutorials/security/content-security-policy/). This is because the [HTML Imports](/platform/html-imports.html) polyfill uses XHR to do its magic. Native implementations of HTML Imports are needed (see Blink's [crbug.com/240592](http://crbug.com/240592)). In the interim, we're working on a solution.
113+
Yes. By using `polymer.min.js` and [creating elements that use external scripts](/polymer.html#alternate-ways-to-register-an-element), {{site.project_title}} runs under [CSP](http://www.html5rocks.com/tutorials/security/content-security-policy/). If you prefer to keep your element's
114+
script inline to `<polymer-element>`, we recommend using [Vulcanizer](/tooling-strategy.html#vulcanizer)
115+
and running with the `--csp` flag.
116+
117+
In other nuanced cases, {{site.project_title}} fails under CSP. This is because
118+
the [HTML Imports](/platform/html-imports.html) is polyfilled using XHR, which can
119+
in turn, execute strings as JavaScript and fail CSP. This problem will go away with
120+
native HTML Imports (see Blink's [crbug.com/240592](http://crbug.com/240592) tracking bug).
114121

115122
### How can I contribute? {#contributing}
116123

0 commit comments

Comments
 (0)