2001-09-20 04:02:59 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
2001-03-14 05:39:23 +03:00
|
|
|
*
|
2012-05-21 15:12:37 +04: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/. */
|
2001-03-14 05:39:23 +03:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2011-12-18 14:09:16 +04:00
|
|
|
[scriptable, uuid(837d0211-c448-4bb8-a9bf-922ba33b9d37)]
|
2001-03-14 05:39:23 +03:00
|
|
|
interface mozIJSSubScriptLoader : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* This method should only be called from JS!
|
|
|
|
* In JS, the signature looks like:
|
2010-10-07 21:44:55 +04:00
|
|
|
* rv loadSubScript (url [, obj] [, charset]);
|
2001-03-14 05:39:23 +03:00
|
|
|
* @param url the url if the sub-script, it MUST be either a file:,
|
|
|
|
* resource:, or chrome: url, and MUST be local.
|
|
|
|
* @param obj an optional object to evaluate the script onto, it
|
|
|
|
* defaults to the global object of the caller.
|
2010-10-07 21:44:55 +04:00
|
|
|
* @param charset optionally specifies the character encoding of
|
|
|
|
* the file. If absent, the file is interpreted
|
2011-12-18 14:09:16 +04:00
|
|
|
* as ASCII.
|
2001-03-14 05:39:23 +03:00
|
|
|
* @retval rv the value returned by the sub-script
|
|
|
|
*/
|
2011-12-18 14:09:16 +04:00
|
|
|
[implicit_jscontext]
|
|
|
|
jsval loadSubScript(in AString url, [optional] in jsval obj, [optional] in AString charset);
|
2001-03-14 05:39:23 +03:00
|
|
|
};
|