dom/webidl/CSSStyleDeclaration.webidl
author Cameron McCormack <cam@mcc.id.au>
Mon, 16 Sep 2013 09:35:49 +1000
changeset 162033 85ce5e760457df235f5e16dc7488ac66c6c976aa
parent 133326 387e67f2b745b0fc444463d60d2ae1f8dc494118
child 218196 f2791f426d6f3feaefef846f0e829c454344708d
permissions -rw-r--r--
Bug 731271 - Part 6: Add a chrome-only CSSDeclaration.getAuthoredPropertyValue() method to expose a property value in its original syntactic form. r=dbaron

/* -*- 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 http://mozilla.org/MPL/2.0/.
 *
 * The origin of this IDL file is
 * http://dev.w3.org/csswg/cssom/
 */

interface CSSRule;

interface CSSStyleDeclaration {
  [SetterThrows]
  attribute DOMString cssText;

  readonly attribute unsigned long length;
  getter DOMString item(unsigned long index);

  [Throws]
  DOMString getPropertyValue(DOMString property);
  // Mozilla extension, sort of
  [Throws]
  CSSValue? getPropertyCSSValue(DOMString property);
  DOMString getPropertyPriority(DOMString property);
  [Throws]
  void setProperty(DOMString property, DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
  [Throws]
  DOMString removeProperty(DOMString property);

  readonly attribute CSSRule? parentRule;
};

// Mozilla extensions
partial interface CSSStyleDeclaration {
  [ChromeOnly,Throws]
  DOMString getAuthoredPropertyValue(DOMString property);
};