[XFA] Send URLs as strings, rather than objects (issue 1773)

Given that `URL`s aren't supported by the structured clone algorithm, see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm, the document in issue 1773 will cause the browser to throw `DataCloneError: The object could not be cloned.`-errors and nothing will render.
To fix this, we'll instead simply send the stringified version of the `URL` to prevent these errors from occuring.
This commit is contained in:
Jonas Jenwald 2021-05-22 09:57:44 +02:00
parent 0dba468e60
commit ba13bd8c2d

View File

@ -2257,7 +2257,7 @@ class Image extends StringObject {
};
if (this.href) {
html.attributes.src = new URL(this.href);
html.attributes.src = new URL(this.href).href;
return html;
}