KJS::FunctionImp

#include <scriptfunction.h>

Inherits KJS::InternalFunctionImp.

Public Member Functions

 FunctionImp (ExecState *exec, const Identifier &n, FunctionBodyNode *b, const ScopeChain &sc)
 
virtual JSValuecallAsFunction (ExecState *exec, JSObject *thisObj, const List &args)
 
virtual const ClassInfoclassInfo () const
 
JSObject * construct (ExecState *exec, const List &args)
 
virtual bool deleteProperty (ExecState *exec, const Identifier &propertyName)
 
virtual bool getOwnPropertyDescriptor (ExecState *, const Identifier &, PropertyDescriptor &)
 
virtual bool getOwnPropertySlot (ExecState *, const Identifier &, PropertySlot &)
 
Identifier getParameterName (size_t index)
 
bool implementsConstruct () const
 
virtual void mark ()
 
virtual void put (ExecState *exec, const Identifier &propertyName, JSValue *value, int attr=None)
 
const ScopeChain & scope () const
 
void setScope (const ScopeChain &s)
 
UString toSource () const
 

Public Attributes

RefPtr< FunctionBodyNodebody
 

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

const ScopeChain& KJS::FunctionImp::scope ( ) const
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
execThe 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-2020 The KDE developers.
Generated on Tue Jul 14 2020 23:00:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.