universal_html
universal_html copied to clipboard
Add possibility to get a node attribute
First of all, congrats to you! Your package is the only one that i've found that can handle with dumbs htmls inputs (broken ones).
Can you make the attributes of a Node being public? I mean, for now I'm using some regex approachs to got some attrs (like name/id/value).
// Current approach:
tree.getElementsByName('javax.faces.ViewState').first;
final jsfaces = Re.firstGroup(el.toString(), r'value=\s*"(.*)"');
// An interesting approach:
final jsfaces = tree.getElementsByName('javax.faces.ViewState').first.attributes['value'];