KJS::FunctionImp
KJS::FunctionImp Class Reference
#include <scriptfunction.h>
Inherits KJS::InternalFunctionImp.
Public Member Functions | |
FunctionImp (ExecState *exec, const Identifier &n, FunctionBodyNode *b, const ScopeChain &sc) | |
JSValue * | callAsFunction (ExecState *exec, JSObject *thisObj, const List &args) override |
const ClassInfo * | classInfo () const override |
JSObject * | construct (ExecState *exec, const List &args) override |
bool | deleteProperty (ExecState *exec, const Identifier &propertyName) override |
bool | getOwnPropertyDescriptor (ExecState *, const Identifier &, PropertyDescriptor &) override |
bool | getOwnPropertySlot (ExecState *, const Identifier &, PropertySlot &) override |
Identifier | getParameterName (size_t index) |
bool | implementsConstruct () const override |
void | mark () override |
void | put (ExecState *exec, const Identifier &propertyName, JSValue *value, int attr=None) override |
const ScopeChain & | scope () const |
void | setScope (const ScopeChain &s) |
UString | toSource () const |
Public Attributes | |
RefPtr< FunctionBodyNode > | body |
Static Public Attributes | |
static const ClassInfo | info = {"Function", &InternalFunctionImp::info, nullptr, nullptr} |
Detailed Description
Implementation class for internal Functions.
Definition at line 37 of file scriptfunction.h.
Member Function Documentation
◆ scope()
|
inline |
Returns the scope of this object.
This is used when execution declared functions - the execution context for the function is initialized with extra object in its scope. An example of this is functions declared inside other functions:
function f() {
function b() {
return prototype;
}
var x = 4;
// do some stuff
}
f.prototype = new String();
When the function f.b is executed, its scope will include properties of f. So in the example above the return value of f.b() would be the new String object that was assigned to f.prototype.
- Parameters
-
exec The current execution state
- Returns
- The function's scope
Definition at line 99 of file scriptfunction.h.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Jan 27 2023 07:38:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Jan 27 2023 07:38:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.