Accessing the DOM element $0 pointer from bookmarklet

99 views
Skip to first unread message

ram...@gmail.com

unread,
Mar 22, 2014, 10:20:05 AM3/22/14
to google-chrome-...@googlegroups.com
Hi,

Is it possible to access the $0 DOM element pointer from bookmarklet or snippet console.?

-Venkat

PhistucK

unread,
Mar 22, 2014, 10:39:22 AM3/22/14
to Google Chrome Developer Tools
I think it is possible using snippets, because I believe they are executed using the console.
However, bookmarklets are running within the context of the page, unrelated to the console, so I believe $0 is not accessible to them.


PhistucK


--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/25f52ff0-aeb7-4972-b0d9-8beba2f525fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ram...@gmail.com

unread,
Mar 22, 2014, 10:48:01 AM3/22/14
to google-chrome-...@googlegroups.com
"$0" is not accessible from snippet :-( too. (tried just $0, or window.$0). 

PhistucK

unread,
Mar 22, 2014, 11:36:42 AM3/22/14
to Google Chrome Developer Tools
You are right. Interesting. I wonder why it is not run the same way console command run.


PhistucK


On Sat, Mar 22, 2014 at 4:48 PM, <ram...@gmail.com> wrote:
"$0" is not accessible from snippet :-( too. (tried just $0, or window.$0). 

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages