diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /parser/html/nsIScriptableUnescapeHTML.idl | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'parser/html/nsIScriptableUnescapeHTML.idl')
-rw-r--r-- | parser/html/nsIScriptableUnescapeHTML.idl | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/parser/html/nsIScriptableUnescapeHTML.idl b/parser/html/nsIScriptableUnescapeHTML.idl new file mode 100644 index 000000000..238adf0dc --- /dev/null +++ b/parser/html/nsIScriptableUnescapeHTML.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 8; 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/. */ + +#include "nsISupports.idl" + +interface nsIDOMElement; +interface nsIDOMDocumentFragment; +interface nsIURI; + +/** + * This interface is OBSOLETE and exists solely for legacy extensions. + */ +[scriptable, uuid(3ab244a9-f09d-44da-9e3f-ee4d67367f2d)] +interface nsIScriptableUnescapeHTML : nsISupports +{ + /** + * Converts HTML to plain text. This is equivalent to calling + * nsIParserUtils::convertToPlainText(src, + * nsIDocumentEncoder::OutputSelectionOnly | + * nsIDocumentEncoder::OutputAbsoluteLinks, 0). + * + * You should call nsIParserUtils::convertToPlainText() instead of calling + * this method. + * + * @param src The HTML string to convert to plain text. + */ + AString unescape(in AString src); + + /** + * Parses markup into a sanitized document fragment. This is equivalent to + * calling nsIParserUtils::parseFragment(fragment, 0, isXML, baseURI, + * element). + * + * You should call nsIParserUtils::parseFragment() instead of calling this + * method. + * @param fragment the input markup + * @param isXML true if |fragment| is XML and false if HTML + * @param baseURI the base URL for this fragment + * @param element the context node for the fragment parsing algorithm + */ + nsIDOMDocumentFragment parseFragment(in AString fragment, + in boolean isXML, + in nsIURI baseURI, + in nsIDOMElement element); +}; + +%{ C++ +#define NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID \ + "@mozilla.org/feed-unescapehtml;1" +#define NS_SCRIPTABLEUNESCAPEHTML_CID \ +{ 0x10f2f5f0, 0xf103, 0x4901, { 0x98, 0x0f, 0xba, 0x11, 0xbd, 0x70, 0xd6, 0x0d} } +%} |