fix the format and use window.location

This commit is contained in:
Yanzhen Yu
2018-12-30 21:50:04 +08:00
parent 91e031844e
commit 7c275cbf2c
2 changed files with 9 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ function serializeNode(n: Node, doc: Document): serializedNode | false {
if (name === 'src' || name === 'href') {
attributes[name] = absoluteToDoc(doc, value);
} else if (name === 'style') {
attributes[name] = absoluteToStylesheet(value, doc.location.href);
attributes[name] = absoluteToStylesheet(value, location.href);
} else {
attributes[name] = value;
}