embedding tweaks: resolve relative "source" URL to current page before passing to app

docs: embedding: add example using latest npm release for testing, recommend versioned releases for production
This commit is contained in:
Ilya Kreymer
2021-03-18 22:17:41 -07:00
parent 1968a5862b
commit 7b41fdc234
3 changed files with 18 additions and 13 deletions
+3 -1
View File
@@ -121,8 +121,10 @@ class Embed extends LitElement
this.embed = this.embed || "default";
const source = new URL(this.source, document.baseURI);
this.paramString = new URLSearchParams({
source: this.source,
source,
customColl: this.coll,
config: this.config,
basePageUrl: window.location.href.split("#")[0],