@csvbox/csvboxjs
Advanced tools
Comparing version
17
index.js
@@ -10,2 +10,3 @@ class CSVBoxImporter { | ||
this.columns = []; | ||
this.options = []; | ||
@@ -17,6 +18,3 @@ if (callback && (typeof callback == "function")) { | ||
if(document.readyState === "complete") { | ||
console.log("document already laoded") | ||
self.setUpImporter(); | ||
}else{ | ||
console.log("document not laoded") | ||
} | ||
@@ -91,2 +89,5 @@ document.addEventListener('DOMContentLoaded', function() { | ||
}, "*"); | ||
iframe.contentWindow.postMessage({ | ||
"options" : self.options | ||
}, "*"); | ||
} | ||
@@ -119,3 +120,2 @@ | ||
this.holder.style.display = 'none'; | ||
this.holder.querySelector('iframe').src = this.holder.querySelector('iframe').src; | ||
this.isModalShown = false; | ||
@@ -177,4 +177,13 @@ } | ||
setOptions(options) { | ||
this.options = options; | ||
if(this.iframe) { | ||
this.iframe.contentWindow.postMessage({ | ||
"options" : this.options | ||
}, "*"); | ||
} | ||
} | ||
} | ||
export default CSVBoxImporter; |
{ | ||
"name": "@csvbox/csvboxjs", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "JS adapter for csvbox.io", | ||
@@ -5,0 +5,0 @@ "author": "csvbox-io", |
7256
1.95%158
5.33%