From 056b317116e3185cc3ddc41f8c9fe18703b0e287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20de=20Giessen?= Date: Sun, 30 Dec 2018 06:19:31 +0100 Subject: [PATCH] Parse style attributes for absolute URL paths (#5) --- src/snapshot.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/snapshot.ts b/src/snapshot.ts index cc470957..95360b90 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -105,6 +105,8 @@ function serializeNode(n: Node, doc: Document): serializedNode | false { // relative path in attribute if (name === 'src' || name === 'href') { attributes[name] = absoluteToDoc(doc, value); + } else if (name === 'style') { + attributes[name] = absoluteToStylesheet(value, doc.location.href); } else { attributes[name] = value; }