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

Commit

Permalink
use __resource while loading so .import can be a loaded signal
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Jan 18, 2014
1 parent ae34005 commit a1490ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ var importParser = {
parseLink: function(linkElt) {
if (isDocumentLink(linkElt)) {
this.trackElement(linkElt);
if (linkElt.import) {
importParser.parse(linkElt.import, function() {
if (linkElt.__resource) {
importParser.parse(linkElt.__resource, function() {
// import is now ready so make available
linkElt.import = linkElt.__resource;
// fire load event
linkElt.dispatchEvent(new CustomEvent('load', {bubbles: false}));
});
Expand Down

0 comments on commit a1490ad

Please sign in to comment.