2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsIDOMDocument.idl"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The nsIDOMHTMLDocument interface is the interface to a [X]HTML
|
|
|
|
* document object.
|
|
|
|
*
|
2011-05-28 00:43:57 -07:00
|
|
|
* @see <http://www.whatwg.org/html/>
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2011-07-07 11:17:13 -07:00
|
|
|
interface nsISelection;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-07-30 01:47:28 -07:00
|
|
|
[scriptable, uuid(cb0cc619-5862-4e00-86d3-dca3c6ecc34b)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIDOMHTMLDocument : nsIDOMDocument
|
|
|
|
{
|
2011-05-28 00:43:57 -07:00
|
|
|
attribute DOMString domain;
|
|
|
|
attribute DOMString cookie;
|
|
|
|
|
|
|
|
readonly attribute nsIDOMHTMLHeadElement head;
|
2007-03-22 10:30:00 -07:00
|
|
|
attribute nsIDOMHTMLElement body;
|
2011-05-28 00:43:57 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
readonly attribute nsIDOMHTMLCollection images;
|
2011-05-28 00:43:57 -07:00
|
|
|
readonly attribute nsIDOMHTMLCollection embeds;
|
|
|
|
// mapped to attribute embeds for NS4 compat
|
|
|
|
readonly attribute nsIDOMHTMLCollection plugins;
|
2007-03-22 10:30:00 -07:00
|
|
|
readonly attribute nsIDOMHTMLCollection links;
|
|
|
|
readonly attribute nsIDOMHTMLCollection forms;
|
2011-09-09 10:18:03 -07:00
|
|
|
readonly attribute nsIDOMHTMLCollection scripts;
|
2011-05-28 00:43:57 -07:00
|
|
|
nsIDOMNodeList getElementsByName(in DOMString elementName);
|
2012-06-04 16:49:57 -07:00
|
|
|
nsIDOMNodeList getItems([optional] in DOMString types);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-05-28 00:43:57 -07:00
|
|
|
// If aContentType is not something supported by nsHTMLDocument and
|
|
|
|
// the HTML content sink, trying to write to the document will
|
|
|
|
// probably throw.
|
|
|
|
// Pass aReplace = true to trigger a replacement of the previous
|
|
|
|
// document in session history; pass false for normal history handling.
|
2011-05-30 04:35:55 -07:00
|
|
|
[implicit_jscontext, optional_argc]
|
|
|
|
nsISupports open([optional] in DOMString aContentTypeOrUrl,
|
|
|
|
[optional] in DOMString aReplaceOrName,
|
|
|
|
[optional] in DOMString aFeatures);
|
2007-03-22 10:30:00 -07:00
|
|
|
void close();
|
|
|
|
|
2011-05-19 13:05:46 -07:00
|
|
|
[implicit_jscontext]
|
2009-09-24 10:59:43 -07:00
|
|
|
void write([optional, Null(Stringify)] in DOMString text);
|
2011-05-19 13:05:46 -07:00
|
|
|
[implicit_jscontext]
|
2009-09-24 10:59:43 -07:00
|
|
|
void writeln([optional, Null(Stringify)] in DOMString text);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-05-28 00:43:57 -07:00
|
|
|
/**
|
|
|
|
* Midas additions
|
|
|
|
*/
|
|
|
|
attribute DOMString designMode;
|
|
|
|
|
|
|
|
boolean execCommand(in DOMString commandID,
|
2012-03-12 15:12:19 -07:00
|
|
|
[optional] in boolean doShowUI,
|
|
|
|
[optional] in DOMString value);
|
2011-05-28 00:43:57 -07:00
|
|
|
|
|
|
|
// returns true if the command is enabled (false otherwise)
|
|
|
|
boolean queryCommandEnabled(in DOMString commandID);
|
|
|
|
|
|
|
|
// returns true if the command is in a indeterminate state (false otherwise)
|
|
|
|
boolean queryCommandIndeterm(in DOMString commandID);
|
|
|
|
|
|
|
|
// returns true if the command has been executed (false otherwise)
|
|
|
|
boolean queryCommandState(in DOMString commandID);
|
|
|
|
|
|
|
|
// returns true if the command is supported on the current range
|
|
|
|
boolean queryCommandSupported(in DOMString commandID);
|
|
|
|
|
|
|
|
// returns the current value of the document or current selection for command
|
|
|
|
DOMString queryCommandValue(in DOMString commandID);
|
|
|
|
|
|
|
|
|
|
|
|
// Obsolete APIs
|
|
|
|
attribute DOMString fgColor;
|
|
|
|
attribute DOMString bgColor;
|
|
|
|
attribute DOMString linkColor;
|
|
|
|
attribute DOMString vlinkColor;
|
|
|
|
attribute DOMString alinkColor;
|
|
|
|
|
|
|
|
readonly attribute nsIDOMHTMLCollection anchors;
|
|
|
|
readonly attribute nsIDOMHTMLCollection applets;
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
|
|
|
|
|
|
|
|
// DOM Range
|
2011-07-07 11:17:13 -07:00
|
|
|
nsISelection getSelection();
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|