https://github.com/mozilla/pdf.js/blob/9bed695ebde488b49d39290087f72ba224bd1078/examples/node/domstubs.js#L84-L87
```javascript
  setAttributeNS: function DOMElement_setAttributeNS(NS, name, value) {
    value = value || '';
    value = xmlEncode(value);
    this.attributes[name] = value;
```

https://github.com/mozilla/pdf.js/blob/9bed695ebde488b49d39290087f72ba224bd1078/examples/node/domstubs.js#L105

```javascript
      buf.push(' ' + i + '="' + xmlEncode(this.attributes[i]) + '"');
```

One of the two should be removed. Most likely the first one, because `getAttributeNS`'s implementation just returns `this.attributes[i]`, and that should not be encoded.
return { src: "" };
  },
  get documentElement() {
    return this;
  },
  createElementNS(NS, element) {
    const elObject = new DOMElement(element);
    return elObject;
  },
  createElement(element) {
    return this.createElementNS("", element);
  },
  getElementsByTagName(element) {
    if (element === "head") {
      return [this.head || (this.head = new DOMElement("head"))];
    }
    return [];
  },
};
function Image() {