We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5d4ce2 commit 1897300Copy full SHA for 1897300
src/wrappers/wrapper.js
@@ -37,11 +37,12 @@ export default class Wrapper implements BaseWrapper {
37
* Returns an Object containing all the attribute/value pairs on the element.
38
*/
39
attributes (): { [name: string]: string } {
40
- const attributes = [...this.element.attributes] // NameNodeMap is not iterable
+ const attributes = this.element.attributes
41
const attributeMap = {}
42
- attributes.forEach((att) => {
+ for (let i = 0; i < attributes.length; i++) {
43
+ const att = attributes.item(i)
44
attributeMap[att.localName] = att.value
- })
45
+ }
46
return attributeMap
47
}
48
0 commit comments