Hi Johan,

HTML imports are automatically de-duplicated based on URL. So if 20
components load Polymer this way:

<link rel="import" href="../../components/polymer/polymer.html>

And assuming all the imports resolve to the same URL, say:

https://www.example.com/components/polymer/polymer.html

Then the polymer.html file is only loaded once and polymer.js is only
executed once. That's why we typically have an import for polymer.html at
the beginning of each custom element file.

(It's also why we use a flat dependency structure, so anything in
/components/ can reference another component using ../component-name/...
this ensures that both core-menu and paper-button use the same path for
polymer.html, for example.)

Script tags don't de-dup, which is why the we recommend loading the
webcomponents polyfill from your main page before importing any custom
elements.

If you load polymer.js using a script tag, you generally won't be able to
use other people's custom elements out of the box.

Hope this helps,
Arthur


On Fri, Mar 13, 2015 at 3:33 PM, Johan Rabie <[email protected]> wrote:

> I don't know, still learning as I am going on.
> I know the polymer.html file imports the polymer.js in a script tag, how
> the system deals with it in the backend I have no clue.
> But for what ever reason, cleaning that up from the custom components
> seemed to do the trick.
> It's a bit concerning, but I am sure there is something obvious that I
> might be missing.
> For now though, alls well that ends well and I thank you for your effort
> and dedication.
>
> 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/31134b51-dddd-47aa-91c8-be091a9d92f7%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/31134b51-dddd-47aa-91c8-be091a9d92f7%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/CADSbU_waVy5ffzaRDNCH-Vow0QSSqAAZd6FCD_ZP0hpMAfaczQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to