I believe that's a leftover from an earlier time when we thought this would
be the case.

HTML Imports follow the same restrictions as XHR:

- need to be fetched from http(s). Blink imposes security restrictions on
what you can do with file://.
- CORs enabled if remote

We'll update that language.

On Tue, Oct 28, 2014 at 5:11 PM, <[email protected]> wrote:

> On the Polymer site under Creating elements there is a note that says
>>
>> You must run your app from a web server for the HTML Imports
>> <https://www.polymer-project.org/platform/html-imports.html> polyfill to
>> work properly. This requirement goes away when the API is available
>> natively.
>
>
> So lets say for an offline op where I am just opening an html file via
> open file or double clicking on it.  The html file is just a simple custom
> element that imports polymer.html
>
> When I run this I get a CORS error
>
>> Imported resource from origin 'file://' has been blocked from loading by
>>> Cross-Origin Resource Sharing policy: Received an invalid response. Origin
>>> 'null' is therefore not allowed access. el.html:1
>>
>> Uncaught ReferenceError: Polymer is not defined
>>
>>
> Is this the correct behavior since it is natively supported now in latest
> chrome according to above statement it should work, or is cors another
> issue.  I understand CORS and how to handle it when using a web server but
> not when just opening an html file via file://
>
> Thanks,
> Dan
>
> Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/e9d635f5-11e7-4a9b-815c-aca93cd3df4e%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/e9d635f5-11e7-4a9b-815c-aca93cd3df4e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CACGqRCB%3Dsf%3D%3Dq0rCdO8tCmhuebzVuUVajLXZNG0L1NeoRD1xDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to