diff --git a/edit/edit.js b/edit/edit.js index e1eb8f7c..1f3d72a1 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -1504,8 +1504,14 @@ function fromMozillaFormat() { }, 100); }); - function doImport() { - const replaceOldStyle = this.name === 'import-replace'; + function doImport(event) { + // parserlib contained in CSSLint-worker.js + onDOMscripted(['vendor-overwrites/csslint/csslint-worker.js']) + .then(() => doImportWhenReady(event.target)); + } + + function doImportWhenReady(target) { + const replaceOldStyle = target.name === 'import-replace'; $('.dismiss', popup).onclick(); const mozStyle = trimNewLines(popup.codebox.getValue()); const parser = new parserlib.css.Parser();