Sha256: 8aa8cc7ee151e84af55065ac3b273cd1c79da52ae1f38f8e6bb671cb5e66689b
Contents?: true
Size: 1012 Bytes
Versions: 2
Compression:
Stored size: 1012 Bytes
Contents
//Driver side interface /////////////////////////////////////////////////////////////////////////////////////////////////////////// function if_hook_event(name, info) { //Call the appropriate registered handler if (hookEventHandlers[name] !== undefined) { hookEventHandlers[name](info); } } /////////////////////////////////////////////////////////////////////////////////////////////////////////// //User helpers /////////////////////////////////////////////////////////////////////////////////////////////////////////// var hookEventHandlers = {}; function onHookEvent(eventName, handler) { hookEventHandlers[eventName] = handler; } /////////////////////////////////////////////////////////////////////////////////////////////////////////// <% if @debug %> onHookEvent("test", function(info) { int_dispatch([1, "hook_dump_res", {name: "test", info: info}]); }); onHookEvent("test2", function(info) { int_dispatch([1, "hook_dump_res", {name: "test2", info: info}]); }); <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flok-0.0.105 | app/drivers/chrome/src/hook.js |
flok-0.0.103 | app/drivers/chrome/src/hook.js |