mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
[XFA] Send URL
s 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:
parent
0dba468e60
commit
ba13bd8c2d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue