From f44b2128eaab7739051e22fb98498743e5d38e83 Mon Sep 17 00:00:00 2001 From: terraloader Date: Fri, 8 May 2020 15:02:15 +0200 Subject: [PATCH 1/5] added support for data-urls --- src/httpVueLoader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/httpVueLoader.js b/src/httpVueLoader.js index 9bb2d9f..08f324d 100644 --- a/src/httpVueLoader.js +++ b/src/httpVueLoader.js @@ -249,7 +249,7 @@ return httpVueLoader.httpRequest(componentURL) .then(function(responseText) { - this.baseURI = componentURL.substr(0, componentURL.lastIndexOf('/')+1); + this.baseURI = (componentURL.substr(0, 5) === 'data:' ? '' : componentURL.substr(0, componentURL.lastIndexOf('/')+1)); var doc = document.implementation.createHTMLDocument(''); // IE requires the to come with `) + }, + ... +``` + +or, using `httpVueLoader()` with text scheme via inline script (keep attention to the escaped closing script tag) + +```html +... + +