Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit a1490ad

Browse files
committed
use __resource while loading so .import can be a loaded signal
1 parent ae34005 commit a1490ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Parser.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ var importParser = {
6161
parseLink: function(linkElt) {
6262
if (isDocumentLink(linkElt)) {
6363
this.trackElement(linkElt);
64-
if (linkElt.import) {
65-
importParser.parse(linkElt.import, function() {
64+
if (linkElt.__resource) {
65+
importParser.parse(linkElt.__resource, function() {
66+
// import is now ready so make available
67+
linkElt.import = linkElt.__resource;
6668
// fire load event
6769
linkElt.dispatchEvent(new CustomEvent('load', {bubbles: false}));
6870
});

0 commit comments

Comments
 (0)