author Neil Deakin <>
Thu, 19 Jul 2018 08:38:45 -0400
changeset 427271 68da215bdf87b5486a4f8c0a600ef77112f21ac4
parent 427268 17dd12ac3d4e9c1d5a13da773cc88a9c143955ec
child 436266 b417c2d937e8b0a4987e61b1d47efae4435a3fde
permissions -rw-r--r--
Bug 1461742, add a mechanism so that custom elements can implement interfaces akin to XBL implements. This is accomplished by an additional chrome-only callback getCustomInterface that can be implemented by custom elements, 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 IID;

callback LifecycleConnectedCallback = void();
callback LifecycleDisconnectedCallback = void();
callback LifecycleAdoptedCallback = void(Document? oldDocument,
                                         Document? newDocment);
callback LifecycleAttributeChangedCallback = void(DOMString attrName,
                                                  DOMString? oldValue,
                                                  DOMString? newValue,
                                                  DOMString? namespaceURI);
callback LifecycleGetCustomInterfaceCallback = object?(IID iid);

dictionary LifecycleCallbacks {
  LifecycleConnectedCallback connectedCallback;
  LifecycleDisconnectedCallback disconnectedCallback;
  LifecycleAdoptedCallback adoptedCallback;
  LifecycleAttributeChangedCallback attributeChangedCallback;
  [ChromeOnly] LifecycleGetCustomInterfaceCallback getCustomInterfaceCallback;