javascript - Simulating mouse events in Firefox extension -


i need simulate trusted mousemove event in javascript. read there:

http://help.dottoro.com/ljoljvsn.php

in firefox, event trusted if invoked user , not trusted if invoked script.

and after started search other solution. found this:

are events generated firefox extension 'trusted'?

yes, events generated extensions trusted.

so, want write firefox extension allow me create mousemove trusted event. unfortunately, i've never written extensions firefox, need clarify points. have:

  1. i downloaded example of xpi file
  2. i created install.rdf , bootstrap.js bootstraped extension (like firebug)

but don't understand:

  1. in article: https://developer.mozilla.org/en-us/add-ons/code_snippets/miscellaneous#simulating_mouse_and_key_events

i see code:

var utils = window.queryinterface(components.interfaces.nsiinterfacerequestor)                       .getinterface(components.interfaces.nsidomwindowutils); utils.sendmouseevent("mousedown", 10, 10, 0, 1, 0); utils.sendmouseevent("mouseup", 10, 10, 0, 1, 0); 

what point in bootstrap.js must insert code? how understand must attach in active(or specified?) window.

  1. how can can run extension code in javascript global object "console" in firebug extension?

i appreciate explanation


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -