dy / spect

Observable selectors in DOM
https://dy.github.io/spect
MIT License
76 stars 8 forks source link

h: expose internal refs #221

Closed dy closed 3 years ago

dy commented 4 years ago

It's useful to have refs available on created node, similar to $ - it's anyways there on eval.

let a = h`<a#id><b#id2/></a>`
a.id

That would require result to be fragment only though, otherwise simple node methods/params will possibly be obscured by ref ids. Maybe via # as a['#id']? Window has ids exposed though without problems - own window props are left untouched.

dy commented 3 years ago

Just access window directly.