starlib
starlib copied to clipboard
html: support print() of selection
calling print() on a selection yields:
struct(attr = <built-in function attr>, children = <built-in function children>, children_filtered = <built-in function children_filtered>, contents = <built-in function contents>, eq = <built-in function eq>, filter = <built-in function filter>, find = <built-in function find>, first = <built-in function first>, get = <built-in function get>, has = <built-in function has>, last = <built-in function last>, len = <built-in function len>, parent = <built-in function parent>, parents_until = <built-in function parents_until>, siblings = <built-in function siblings>, text = <built-in function text>)
I am currently in need of a way to inspect what was captured in the selection. jQuery has an innerHTML() method that can be helpful for this, but I think calling console.log() with the jQuery object also reveals an array of the elements that were selected.
I'm also struggling with this right now, the filter method is not returning what I expect and I have no way of knowing the position it actually is inside the document.