Skip to content

Instantly share code, notes, and snippets.

@JanMiksovsky
Created April 23, 2014 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JanMiksovsky/11201962 to your computer and use it in GitHub Desktop.
Save JanMiksovsky/11201962 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dynamic HTML import of element definition doesn't trigger upgrade</title>
<script src="http://www.polymer-project.org/platform.js"></script>
<!-- If uncommented, the static version of this link works. -->
<!-- <link rel="import" href="http://jsbin.com/vovun/2"> -->
<script>
window.addEventListener( "load", function() {
// Dynamically import an element definition.
var link = document.createElement( "link" );
link.setAttribute( "rel", "import" );
link.setAttribute( "href", "https://gist.githubusercontent.com/JanMiksovsky/11201938/raw/41ea2e8b1dc2566acbab9ea05e54717108b8426a/gistfile1.html" );
document.head.appendChild( link );
});
</script>
</head>
<body>
<test-element>world</test-element>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment