1/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * The origin of this IDL file is
7 * http://dev.w3.org/csswg/cssom/
8 */
9
10interface StyleSheet {
11  [Constant]
12  readonly attribute DOMString type;
13  [Constant, Throws]
14  readonly attribute DOMString? href;
15  // Spec says "Node", but it can go null when the node gets a new
16  // sheet.  That's also why it's not [Constant]
17  [Pure]
18  readonly attribute Node? ownerNode;
19  [Pure]
20  readonly attribute StyleSheet? parentStyleSheet;
21  [Pure]
22  readonly attribute DOMString? title;
23  [Constant, PutForwards=mediaText]
24  readonly attribute MediaList media;
25  [Pure]
26  attribute boolean disabled;
27  // The source map URL for this style sheet.  The source map URL can
28  // be found in one of two ways.
29  //
30  // If a SourceMap or X-SourceMap response header is seen, this is
31  // the value.  If both are seen, SourceMap is preferred.  Because
32  // this relies on the HTTP response, it can change if checked before
33  // the response is available -- which is why it is not [Constant].
34  //
35  // If the style sheet has the special "# sourceMappingURL=" comment,
36  // then this is the URL specified there.
37  //
38  // If the source map URL is not found by either of these methods,
39  // then this is an empty string.
40  [ChromeOnly, Pure]
41  readonly attribute DOMString sourceMapURL;
42  // The source URL for this style sheet.  If the style sheet has the
43  // special "# sourceURL=" comment, then this is the URL specified
44  // there.  If no such comment is found, then this is the empty
45  // string.
46  [ChromeOnly, Pure]
47  readonly attribute DOMString sourceURL;
48};
49