UNPKG

selenium-webdriver

Version:

The official WebDriver JavaScript bindings from the Selenium project

16 lines (15 loc) 9.42 kB
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.events.Event</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class goog.events.Event</h1><a class="source" href="source/lib/goog/events/event.js.src.html#l55">code &raquo;</a></header><section><p>A base class for event objects, so that they can support preventDefault and stopPropagation.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member">goog.events.Event <span class="args">( type, opt_target )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|!<a href="class_goog_events_EventId.html">goog.events.EventId</a>)</code><dd>Event Type.<dt>opt_target: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Reference to the object that is the target of this event. It has to implement the <code >EventTarget</code> interface declared at <code class="type"><a class="unresolved-link">http://developer.mozilla.org/en/DOM/EventTarget</a></code>.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="instance-methods"><h2>Instance Methods</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l121">code &raquo;</a><span class="member deprecation-notice"><a name="dispose">dispose</a> <span class="args">( )</span></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Events don't need to be disposed.</span></div><p>For backwards compatibility (goog.events.Event used to inherit goog.Disposable).</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l112">code &raquo;</a><span class="member deprecation-notice"><a name="disposeInternal">disposeInternal</a> <span class="args">( )</span></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Events don't need to be disposed.</span></div><p>For backwards compatibility (goog.events.Event used to inherit goog.Disposable).</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l136">code &raquo;</a><span class="member"><a name="preventDefault">preventDefault</a> <span class="args">( )</span></span></div><p>Prevents the default action, for example a link redirecting to a url.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l128">code &raquo;</a><span class="member"><a name="stopPropagation">stopPropagation</a> <span class="args">( )</span></span></div><p>Stops event propagation.</summary></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l75">code &raquo;</a><span class="member"><a name="currentTarget">currentTarget</a> : <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)</code></span></div><p>Object that had the listener attached.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l94">code &raquo;</a><span class="member"><a name="defaultPrevented">defaultPrevented</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Whether the default action has been prevented. This is a property to match the W3C specification at <code class="type"><a class="unresolved-link">#events-event-type-defaultPrevented</a></code>. Must be treated as read-only outside the class.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l84">code &raquo;</a><span class="member"><a name="propagationStopped_">propagationStopped_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Whether to cancel the event in internal capture/bubble processing for IE.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l103">code &raquo;</a><span class="member"><a name="returnValue_">returnValue_</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Return value for in internal capture/bubble processing for IE.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l69">code &raquo;</a><span class="member"><a name="target">target</a> : <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)</code></span></div><p>TODO(user): The type should probably be EventTarget|goog.events.EventTarget. Target of the event.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l60">code &raquo;</a><span class="member"><a name="type">type</a> : <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Event type.</summary></details></div></div></section><section id="static-functions"><h2>Static Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l159">code &raquo;</a><span class="member"><a name="goog.events.Event.preventDefault">goog.events.Event.preventDefault</a> <span class="args">( e )</span></span></div><p>Prevents the default action. It is equivalent to <code >e.preventDefault()</code>, but can be used as the callback argument of <code class="type"><a href="namespace_goog_events.html#goog.events.listen">goog.events.listen</a></code> without declaring another function.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>e: <code class="type">!<a href="class_goog_events_Event.html">goog.events.Event</a></code><dd>An event.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/events/event.js.src.html#l148">code &raquo;</a><span class="member"><a name="goog.events.Event.stopPropagation">goog.events.Event.stopPropagation</a> <span class="args">( e )</span></span></div><p>Stops the propagation of the event. It is equivalent to <code >e.stopPropagation()</code>, but can be used as the callback argument of <code class="type"><a href="namespace_goog_events.html#goog.events.listen">goog.events.listen</a></code> without declaring another function.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>e: <code class="type">!<a href="class_goog_events_Event.html">goog.events.Event</a></code><dd>An event.</dl></table></div></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>