author Reuben Morais <>
Sun, 25 May 2014 15:31:11 -0300
changeset 192401 4136b65c1c4b1578631c18dfffff3cec2aa52b4e
parent 133516 a6de622f95744e724e08f448a6489ee272ad5463
child 207457 cea6d1d8e0d160c80e1c021e930d984c23199e3c
permissions -rw-r--r--
Bug 952486 - Use CheckPermissions instead of Func for several interfaces. r=bz

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at
 * The origin of this IDL file is
 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
 * liability, trademark and document use rules apply.

interface EventTarget {
  /* Passing null for wantsUntrusted means "default behavior", which
     differs in content and chrome.  In content that default boolean
     value is true, while in chrome the default boolean value is
     false. */
  void addEventListener(DOMString type,
                        EventListener? listener,
                        optional boolean capture = false,
                        optional boolean? wantsUntrusted = null);
  void removeEventListener(DOMString type,
                           EventListener? listener,
                           optional boolean capture = false);
  boolean dispatchEvent(Event event);

// Mozilla extensions for use by JS-implemented event targets to
// implement on* properties.
partial interface EventTarget {
  [ChromeOnly, Throws]
  void setEventHandler(DOMString type, EventHandler handler);

  EventHandler getEventHandler(DOMString type);

// Mozilla extension to make firing events on event targets from
// chrome easier.  This returns the window which can be used to create
// events to fire at this EventTarget, or null if there isn't one.
partial interface EventTarget {
  readonly attribute WindowProxy? ownerGlobal;