We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setName
p5.XML
No response
The source code is shown below:
setName(name) { const content = this.DOM.innerHTML; const attributes = this.DOM.attributes; const xmlDoc = document.implementation.createDocument(null, 'default'); const newDOM = xmlDoc.createElement(name); newDOM.innerHTML = content; for (let i = 0; i < attributes.length; i++) { newDOM.setAttribute(attributes[i].nodeName, attributes.nodeValue); } this.DOM = newDOM; }
Should it be newDOM.setAttribute(attributes[i].nodeName, attributes[i].nodeValue); instead? This line was introduce from the commit db90f55.
newDOM.setAttribute(attributes[i].nodeName, attributes[i].nodeValue);
The text was updated successfully, but these errors were encountered:
It looks like the index is indeed missing from the reference to attributes, you can file a PR to fix this if you like.
attributes
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Most appropriate sub-area of p5.js?
p5.js version
No response
Web browser and version
No response
Operating system
No response
Steps to reproduce this
The source code is shown below:
Should it be
newDOM.setAttribute(attributes[i].nodeName, attributes[i].nodeValue);
instead? This line was introduce from the commit db90f55.The text was updated successfully, but these errors were encountered: