Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.8] Polymer.import missing #1248

Closed
IntranetFactory opened this issue Mar 3, 2015 · 10 comments
Closed

[0.8] Polymer.import missing #1248

IntranetFactory opened this issue Mar 3, 2015 · 10 comments
Labels

Comments

@IntranetFactory
Copy link

It seems that Polymer.import is missing in 0.8. Polymer.import is also not mentioned in the Migration Notes of the primer.

Are there any plans to bring it back? Is there any new way to load components on demand?

@sorvell sorvell added 0.8 and removed 0.8 labels Mar 5, 2015
@IntranetFactory
Copy link
Author

I've copied the code from 0.5 to https://github.com/TangereJs/Polymer-import/tree/0.8-preview and it seems to work after a minor change.

Is this the right approach? It works for my current use case, but it seems to easy ...

@IntranetFactory
Copy link
Author

Does anybody have any information about the future of Polymer.import()? Unfortunately that feature is quite essential for us.

The version we made at https://github.com/TangereJs/Polymer-import/tree/0.8-preview has an issue when used with FF/IE: in the freshly imported elements the dom-module is sometimes empty. It seems that the dom-module is upgraded after the Polymer() was already executed.

As a workaround it works if the Polymer() code is included in the dom-module, so if the code is like

<dom-module>
  <template>
  ....
  </template>

  <script>
  Polymer(
  ...
  </script>
</dom-module>

Polymer.import seems to work in IE/FF as well.

@arthurevans
Copy link

@sorvell Can you comment? I believe there is an importHref instance method, but I'm not sure whether it's a replacement for Polymer.import.

@IntranetFactory
Copy link
Author

I've tested importHref it only imports one element and not an array of elements. We can probably work around that limit in our own code.

But importHref has the same problem I faced with our port of Polymer.import: nested dom-modules fail to load correctly in IE/FF. importHref works in IE/FF when I move the <script>Polymer(... into the <dom-module>.

Should importHref work in IE/FF ? Is this a known problem/bug?

@IntranetFactory
Copy link
Author

I've created a new issue to show the importHref issue in FF/IE11 #1343

@IntranetFactory
Copy link
Author

Any help with polymer component imports? Are we doing something wrong or is it really not possible in 0.8 to import components in FF and IE11 ?

@sorvell
Copy link
Contributor

sorvell commented Apr 1, 2015

We're investigating a fix for this issue. It stems from limitations of the HTMLImports and CustomElements polyfills.

@IntranetFactory
Copy link
Author

Thank you for the feedback, good to know that a fix is coming.

@ghmlee
Copy link

ghmlee commented Apr 14, 2015

@sorvell Thanks I also want to know the fix.

@sorvell
Copy link
Contributor

sorvell commented May 22, 2015

Closing this since #1343 has been fixed. The importHref method is intended to replace Polymer.import. We'll consider expanding the api to support an array as Polymer.import did based on user feedback.

@sorvell sorvell closed this as completed May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants