/*
 * dom2stylesheets.idl
 *
 * DOM Level 2 Style Sheets IDL definitions, rewritten in Web IDL.
 *
 * Original OMG IDL:
 *
 *   http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.idl
 */

module stylesheets {

  typedef dom::Node Node;
  typedef dom::Document Document;
  typedef dom::ProcessingInstruction ProcessingInstruction;
  typedef dom::DOMException DOMException;

  // Introduced in DOM Level 2:
  [PrototypeRoot]
  interface StyleSheet {
    readonly attribute DOMString        type;
             attribute boolean          disabled;
    readonly attribute Node             ownerNode;
    readonly attribute StyleSheet       parentStyleSheet;
    readonly attribute DOMString?       href;
    readonly attribute DOMString        title;
    readonly attribute MediaList        media;
  };

  // Introduced in DOM Level 2:
  interface StyleSheetList {
    readonly attribute unsigned long length;
    getter StyleSheet item(in unsigned long index);
  };

  // Introduced in DOM Level 2:
  interface MediaList {
             attribute DOMString        mediaText setraises(DOMException);

    readonly attribute unsigned long    length;
    getter DOMString? item(in unsigned long index);
    void               deleteMedium(in DOMString oldMedium)
                                        raises(DOMException);
    void               appendMedium(in DOMString newMedium)
                                        raises(DOMException);
  };

  // Introduced in DOM Level 2:
  interface LinkStyle {
    readonly attribute StyleSheet       sheet;
  };

  // HTMLLinkElement implements LinkStyle;
  // HTMLStyleElement implements LinkStyle;
  ProcessingInstruction implements LinkStyle;

  // Introduced in DOM Level 2:
  interface DocumentStyle {
    readonly attribute StyleSheetList   styleSheets;
  };

  Document implements DocumentStyle;
};
