Comparing version 0.0.6 to 0.0.7
15
index.js
@@ -334,9 +334,4 @@ const events = require('events'); | ||
const baseUrl = options.url.replace(/\/+$/, ''); | ||
const _normalizeUrl = url => { | ||
if (!/^.+?:/.test(url)) { | ||
url = baseUrl + (!/^\//.test(url) ? '/' : '') + url; | ||
} | ||
return url; | ||
}; | ||
const baseUrl = options.url; | ||
const _normalizeUrl = src => new URL(src, baseUrl).href; | ||
const _parseStyle = styleString => { | ||
@@ -1117,2 +1112,8 @@ const style = {}; | ||
document.createTextNode = text => new TextNode(text); | ||
document.write = htmlString => { | ||
const childNodes = parse5.parseFragment(htmlString).childNodes.map(childNode => Node.fromAST(childNode, window, this)); | ||
for (let i = 0; i < childNodes.length; i++) { | ||
document.body.appendChild(childNodes[i]); | ||
} | ||
}; | ||
window.document = document; | ||
@@ -1119,0 +1120,0 @@ |
{ | ||
"name": "exokit", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"main": "index.js", | ||
@@ -9,3 +9,3 @@ "dependencies": { | ||
"window-fetch": "0.0.2", | ||
"window-worker": "0.0.18", | ||
"window-worker": "0.0.20", | ||
"ws": "^4.0.0", | ||
@@ -12,0 +12,0 @@ "xmlhttprequest": "^1.8.0" |
81646
2632
+ Addedwindow-worker@0.0.20(transitive)
- Removedwindow-worker@0.0.18(transitive)
Updatedwindow-worker@0.0.20