editor/idl/nsIURIRefObject.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/editor/idl/nsIURIRefObject.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,43 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +#include "domstubs.idl"
    1.11 +
    1.12 +interface nsIDOMNode;
    1.13 +
    1.14 +/** A class which can represent any node which points to an
    1.15 +  * external URI, e.g. <a>, <img>, <script> etc,
    1.16 +  * and has the capability to rewrite URLs to be
    1.17 +  * relative or absolute.
    1.18 +  * Used by the editor but not dependant on it.
    1.19 +  */
    1.20 +
    1.21 +[scriptable, uuid(2226927e-1dd2-11b2-b57f-faab47288563)]
    1.22 +
    1.23 +interface nsIURIRefObject  : nsISupports
    1.24 +{
    1.25 +  attribute nsIDOMNode node;
    1.26 +
    1.27 +  /**
    1.28 +   * Go back to the beginning of the attribute list.
    1.29 +   */
    1.30 +  void Reset();
    1.31 +
    1.32 +  /**
    1.33 +   * Return the next rewritable URI.
    1.34 +   */
    1.35 +  DOMString GetNextURI();
    1.36 +
    1.37 +  /**
    1.38 +   * Go back to the beginning of the attribute list
    1.39 +   *
    1.40 +   * @param aOldPat  Old pattern to be replaced, e.g. file:///a/b/
    1.41 +   * @param aNewPat  New pattern to be replaced, e.g. http://mypage.aol.com/
    1.42 +   * @param aMakeRel Rewrite links as relative vs. absolute
    1.43 +   */
    1.44 +  void RewriteAllURIs(in DOMString aOldPat, in DOMString aNewPat,
    1.45 +                      in boolean aMakeRel);
    1.46 +};

mercurial