Source of file DOMEvent.php
Size: 2,305 Bytes - Last Modified: 2021-12-23T10:34:50+00:00
/var/www/docs.ssmods.com/process/src/thirdparty/phpQuery/phpQuery/phpQuery/DOMEvent.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 | <?php /** * DOMEvent class. * * Based on * @link http://developer.mozilla.org/En/DOM:event * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> * @package phpQuery * @todo implement ArrayAccess ? */ class DOMEvent { /** * Returns a boolean indicating whether the event bubbles up through the DOM or not. * * @var unknown_type */ public $bubbles = true; /** * Returns a boolean indicating whether the event is cancelable. * * @var unknown_type */ public $cancelable = true; /** * Returns a reference to the currently registered target for the event. * * @var unknown_type */ public $currentTarget; /** * Returns detail about the event, depending on the type of event. * * @var unknown_type * @link http://developer.mozilla.org/en/DOM/event.detail */ public $detail; // ??? /** * Used to indicate which phase of the event flow is currently being evaluated. * * NOT IMPLEMENTED * * @var unknown_type * @link http://developer.mozilla.org/en/DOM/event.eventPhase */ public $eventPhase; // ??? /** * The explicit original target of the event (Mozilla-specific). * * NOT IMPLEMENTED * * @var unknown_type */ public $explicitOriginalTarget; // moz only /** * The original target of the event, before any retargetings (Mozilla-specific). * * NOT IMPLEMENTED * * @var unknown_type */ public $originalTarget; // moz only /** * Identifies a secondary target for the event. * * @var unknown_type */ public $relatedTarget; /** * Returns a reference to the target to which the event was originally dispatched. * * @var unknown_type */ public $target; /** * Returns the time that the event was created. * * @var unknown_type */ public $timeStamp; /** * Returns the name of the event (case-insensitive). */ public $type; public $runDefault = true; public $data = null; public function __construct($data) { foreach($data as $k => $v) { $this->$k = $v; } if (! $this->timeStamp) $this->timeStamp = time(); } /** * Cancels the event (if it is cancelable). * */ public function preventDefault() { $this->runDefault = false; } /** * Stops the propagation of events further along in the DOM. * */ public function stopPropagation() { $this->bubbles = false; } } |