fx-compat: Remove DOMParser init() calls

No longer supported. Still possible to pass to the constructor, but
almost certainly not necessary:

https://udn.realityripple.com/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIDOMParser#Principals_document_and_base_URI
This commit is contained in:
Dan Stillman 2023-03-20 16:31:39 -04:00
parent 13cc393840
commit 6117221cbc
2 changed files with 0 additions and 2 deletions

View file

@ -1018,7 +1018,6 @@ Zotero.Attachments = new function(){
// If no title was provided, pull it from the document
if (!title) {
let parser = new DOMParser();
parser.init(null, Services.io.newURI(url));
let doc = parser.parseFromString(snapshotContent, 'text/html');
title = doc.title;
}

View file

@ -1187,7 +1187,6 @@ Zotero.Server.Connector.SaveSnapshot.prototype = {
}
var parser = new DOMParser();
parser.init(null, Services.io.newURI(data.url));
var doc = parser.parseFromString(`<html>${data.html}</html>`, 'text/html');
doc = Zotero.HTTP.wrapDocument(doc, data.url);