This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Command: Simple DOM Grabber
Usage
repl> var res = repl.grab();
repl> /* click an element in the browser... */
repl> alert(res.event.target);
Code
function grab() {
var document = this._workContext.document;
if(!document)
throw new Error('No document around.');
var result = {};
var grabber = function(event) {
result.event = event;
event.stopPropagation();
document.removeEventListener('click', grabber, true);
};
document.addEventListener('click', grabber, true);
return result;
}






