Use document.URL for base if document.baseURI is unavailable.
authorDave Longley <dlongley@digitalbazaar.com>
Sat, 22 Feb 2014 14:28:33 -0500
changeset 2113 7bbd193bedc1
parent 2112 91196a1684b4
child 2114 786396a8e9c1
Use document.URL for base if document.baseURI is unavailable.

Addresses #324.
playground/playground.js
--- a/playground/playground.js	Sat Feb 22 14:25:26 2014 -0500
+++ b/playground/playground.js	Sat Feb 22 14:28:33 2014 -0500
@@ -334,7 +334,7 @@
       var processor = new jsonld.JsonLdProcessor();
 
       // set base IRI
-      var options = {base: document.baseURI};
+      var options = {base: (document.baseURI || document.URL)};
 
       if(playground.activeTab === 'tab-compacted') {
         processor.compact(input, param, options).then(function(compacted) {