## 类的使用
org.mozilla.javascript.ScriptableObject

- 使用ScriptableObject的程序包
  程序包 | 说明
  --- | ---
  kd.bos.script.jsengine |
  kd.bos.script.jsengine.def |
  org.mozilla.javascript |

- - ### kd.bos.script.jsengine中ScriptableObject的使用

    kd.bos.script.jsengine中ScriptableObject的子类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `KScope` 上下文变量持有者(global)，隶属KContext。

  - ### kd.bos.script.jsengine.def中ScriptableObject的使用

    kd.bos.script.jsengine.def中ScriptableObject的子类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `KDyWrapper` 动态封装类。
    `class` | `KNamespace`
    `class` | `KObject` 所有静态封装类，继承此类。

  - ### org.mozilla.javascript中ScriptableObject的使用

    org.mozilla.javascript中ScriptableObject的子类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `org.mozilla.javascript.BaseFunction`
    `class` | `FunctionObject`
    `class` | `org.mozilla.javascript.IdScriptableObject`
    `class` | `NativeJavaMethod` This class reflects Java methods into the JavaScript environment and handles overloading of methods.
    `class` | `NativeNumber` This class implements the Number native object.
    `class` | `org.mozilla.javascript.TopLevel`

    返回ScriptableObject的org.mozilla.javascript中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `static ScriptableObject` | ScriptRuntime.`getGlobal(Context cx)`
    `static ScriptableObject` | ScriptRuntime.`getLibraryScopeOrNull(org.mozilla.javascript.Scriptable scope)`
    `ScriptableObject` | Context.`initSafeStandardObjects()` Initialize the standard objects, leaving out those that offer access directly to Java classes.
    `static ScriptableObject` | ScriptRuntime.`initSafeStandardObjects(Context cx, ScriptableObject scope, boolean sealed)`
    `ScriptableObject` | Context.`initSafeStandardObjects(ScriptableObject scope, boolean sealed)` Initialize the standard objects, leaving out those that offer access directly to Java classes.
    `ScriptableObject` | Context.`initStandardObjects()` Initialize the standard objects.
    `static ScriptableObject` | ScriptRuntime.`initStandardObjects(Context cx, ScriptableObject scope, boolean sealed)`
    `ScriptableObject` | Context.`initStandardObjects(ScriptableObject scope, boolean sealed)` Initialize the standard objects.

    参数类型为ScriptableObject的org.mozilla.javascript中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | ScriptableObject.`defineOwnProperties(Context cx, ScriptableObject props)` Defines one or more properties on this object.
    `void` | ScriptableObject.`defineOwnProperty(Context cx, java.lang.Object id, ScriptableObject desc)` Defines a property on an object.
    `static ScriptableObject` | ScriptRuntime.`initSafeStandardObjects(Context cx, ScriptableObject scope, boolean sealed)`
    `org.mozilla.javascript.Scriptable` | Context.`initSafeStandardObjects(ScriptableObject scope)` Initialize the standard objects, leaving out those that offer access directly to Java classes.
    `ScriptableObject` | Context.`initSafeStandardObjects(ScriptableObject scope, boolean sealed)` Initialize the standard objects, leaving out those that offer access directly to Java classes.
    `static ScriptableObject` | ScriptRuntime.`initStandardObjects(Context cx, ScriptableObject scope, boolean sealed)`
    `org.mozilla.javascript.Scriptable` | Context.`initStandardObjects(ScriptableObject scope)` Initialize the standard objects.
    `ScriptableObject` | Context.`initStandardObjects(ScriptableObject scope, boolean sealed)` Initialize the standard objects.
    `static void` | ScriptRuntime.`setBuiltinProtoAndParent(ScriptableObject object, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.TopLevel.Builtins type)`
    `static void` | ScriptRuntime.`setObjectProtoAndParent(ScriptableObject object, org.mozilla.javascript.Scriptable scope)`