Commit a0170ad7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Added Function.length implementation.

parent 99b4bc23
......@@ -42,8 +42,21 @@ static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','
static HRESULT Function_length(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
FIXME("\n");
FunctionInstance *This = (FunctionInstance*)dispex;
TRACE("%p %d\n", This, This->length);
switch(flags) {
case DISPATCH_PROPERTYGET:
V_VT(retv) = VT_I4;
V_I4(retv) = This->length;
break;
default:
FIXME("unimplemented flags %x\n", flags);
return E_NOTIMPL;
}
return S_OK;
}
static HRESULT Function_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
......
......@@ -256,10 +256,10 @@ static const builtin_prop_t JSGlobal_props[] = {
{NumberW, JSGlobal_Number, PROPF_CONSTR},
{ObjectW, JSGlobal_Object, PROPF_CONSTR},
{RegExpW, JSGlobal_RegExp, PROPF_CONSTR},
{ScriptEngineW, JSGlobal_ScriptEngine, PROPF_METHOD},
{ScriptEngineBuildVersionW, JSGlobal_ScriptEngineBuildVersion, PROPF_METHOD},
{ScriptEngineMajorVersionW, JSGlobal_ScriptEngineMajorVersion, PROPF_METHOD},
{ScriptEngineMinorVersionW, JSGlobal_ScriptEngineMinorVersion, PROPF_METHOD},
{ScriptEngineW, JSGlobal_ScriptEngine, PROPF_METHOD},
{StringW, JSGlobal_String, PROPF_CONSTR},
{VBArrayW, JSGlobal_VBArray, PROPF_METHOD},
{escapeW, JSGlobal_escape, PROPF_METHOD},
......
......@@ -38,4 +38,6 @@ ok(null !== undefined, "null !== undefined is false");
var trueVar = true;
ok(trueVar, "trueVar is not true");
ok(ScriptEngine.length === 0, "ScriptEngine.length is not 0");
reportSuccess();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment