From 1babe0984e340f16f49ff246b251354658d9e2cc Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Wed, 20 Aug 2014 15:56:08 -0700 Subject: [PATCH] Fixes #68. Redirected url is no longer considered for de-duping, but redirected url is used as import baseURI. --- src/HTMLImports.js | 4 +-- src/Loader.js | 17 +++-------- test/html/redirect/imports/load.html | 3 ++ .../redirect/imports/redirect/googley.png | Bin 0 -> 14022 bytes test/html/redirect/imports/redirect/load.html | 10 +++++++ test/html/redirect/load-redirect.html | 27 ++++++++++++++++++ 6 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 test/html/redirect/imports/load.html create mode 100644 test/html/redirect/imports/redirect/googley.png create mode 100644 test/html/redirect/imports/redirect/load.html create mode 100644 test/html/redirect/load-redirect.html diff --git a/src/HTMLImports.js b/src/HTMLImports.js index 868193c..eba1478 100644 --- a/src/HTMLImports.js +++ b/src/HTMLImports.js @@ -56,7 +56,7 @@ if (!useNative) { return doc === mainDoc ? this.documentPreloadSelectors : this.importsPreloadSelectors; }, - loaded: function(url, elt, resource, err) { + loaded: function(url, elt, resource, err, redirectedUrl) { flags.load && console.log('loaded', url, elt); // store generic resource // TODO(sorvell): fails for nodes inside