Skip to content

Can't access element attributes by array index #27

Closed
@fortes

Description

@fortes

I'm having issues iterating over the list of attributes on an element. Here's sample code:

domino = require('domino');

window = domino.createWindow("<h1 lang='en'>Hello</h1>");
h1 = window.document.body.firstChild;

// Outputs 1
console.log(h1.attributes.length);
// Returns undefined, expected an object
console.log(h1.attributes[0]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions