starlib icon indicating copy to clipboard operation
starlib copied to clipboard

html: support print() of selection

Open chriswhong opened this issue 4 years ago • 1 comments

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.

chriswhong avatar Sep 28 '21 19:09 chriswhong

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.

danielsitnik avatar Apr 07 '23 18:04 danielsitnik