Scott Lanning > Mozilla-DOM > Mozilla::DOM::NSEvent

Download:
Mozilla-DOM-0.23.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  5
View/Report Bugs
Source  

NAME ^

Mozilla::DOM::NSEvent

Mozilla::DOM::NSEvent is a wrapper around an instance of Mozilla's nsIDOMNSEvent interface. This class inherits from Supports.

The following constants are available. Export them as

  use Mozilla::DOM::NSEvent qw(:events);
MOUSEDOWN => 1
MOUSEUP => 2
MOUSEOVER => 4
MOUSEOUT => 8
MOUSEMOVE => 16
MOUSEDRAG => 32
CLICK => 64
DBLCLICK => 128
KEYDOWN => 256
KEYUP => 512
KEYPRESS => 1024
DRAGDROP => 2048
FOCUS => 4096
BLUR => 8192
SELECT => 16384
CHANGE => 32768
RESET => 65536
SUBMIT => 131072
SCROLL => 262144
LOAD => 524288
UNLOAD => 1048576
XFER_DONE => 2097152
ABORT => 4194304
ERROR => 8388608
LOCATE => 16777216
MOVE => 33554432
RESIZE => 67108864
FORWARD => 134217728
HELP => 268435456
BACK => 536870912
TEXT => 1073741824
ALT_MASK => 1
CONTROL_MASK => 2
SHIFT_MASK => 4
META_MASK => 8

CLASS METHODS ^

$iid = Mozilla::DOM::NSEvent->GetIID()

Pass this to QueryInterface.

METHODS ^

$originaltarget = $nsevent->GetOriginalTarget()

  /** The original target of the event, before any retargetings. */

Output:

$originaltarget (Mozilla::DOM::EventTarget)

$explicitoriginaltarget = $nsevent->GetExplicitOriginalTarget()

   * The explicit original target of the event.  If the event was retargeted
   * for some reason other than an anonymous boundary crossing, this will be set
   * to the target before the retargeting occurs.  For example, mouse events
   * are retargeted to their parent node when they happen over text nodes (bug
   * 185889), and in that case .target will show the parent and
   * .explicitOriginalTarget will show the text node.
   * .explicitOriginalTarget differs from .originalTarget in that it will never
   * contain anonymous content.

Output:

$explicitoriginaltarget (Mozilla::DOM::EventTarget)

$tmprealoriginaltarget = $nsevent->GetTmpRealOriginalTarget()

Output:

$tmprealoriginaltarget (Mozilla::DOM::EventTarget)

$bool = $nsevent->GetIsTrusted()

Output:

$bool (bool)

$nsevent->PreventBubble()

$nsevent->PreventCapture()

SEE ALSO ^

Mozilla::DOM

COPYRIGHT ^

Copyright (C) 2005-2007, Scott Lanning

This software is licensed under the LGPL. See Mozilla::DOM for a full notice.

syntax highlighting: