Polymer 1.0: importHref

75 views
Skip to first unread message

Hans Dulimarta

unread,
Jan 6, 2016, 11:58:51 AM1/6/16
to Polymer
I was able to inject an external HTML document into my polymer element using the importHref utility function and the document is rendered properly within the polymer element. However, when the HTML document includes GitHub gists like

<script src="https://gist.github.com/xxxxxxxx.js"></script>

The gist code snippets were not rendered. Do I have to write extra code inside the importHref onload callback function to execute the script? 

Eric Bidelman

unread,
Jan 7, 2016, 5:34:15 PM1/7/16
to Hans Dulimarta, Polymer
Not 100% sure how gist embeds work, but it looks like it document.write()'s an iframe into the import document?
This is what I get when I embed a gist in a dom-module:

Screen Shot 2016-01-07 at 2.32.56 PM.png

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 polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/9e0725a9-fb1e-4c88-a975-cc6022a476bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages