In a native HTML Imports, document.currentScript.ownerDocument references the import document itself. In the polyfill use document._currentScript.ownerDocument (note the underscore).
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/b54b3d93-54b8-48d7-8a6c-8239656aaf92%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<html>
<head>
<title>HTML Imports Test</title>
<script src="bower_components/platform/platform.js"></script>
<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="my-import.html">
</head>
<body>
HTML Import Test<br/><br/>
These values are captured in the imported script and then displayed here in the parent doc.<br/><br/>
<code>
<div><strong>document.currentScript = </strong><span id="noPrefix"></span></div>
<div><strong>document._currentScript = </strong><span id="prefixed"></span></div>
<div><strong>HTMLImports.currentScript = </strong><span id="htmlImports"></span></div>
</code>
</body>
</html><script type="text/javascript">
var parentDoc = document;
// Display current script values on parent page
parentDoc.getElementById("noPrefix").innerHTML = "" + document.currentScript;
parentDoc.getElementById("prefixed").innerHTML = "" + document._currentScript
parentDoc.getElementById("htmlImports").innerHTML = "" + HTMLImports.currentScript
</script>