using System;
using System.Collections.Generic;
using Jint.Native.Object;
using Jint.Runtime;
using Jint.Runtime.Interop;
namespace Jint.Native.Function
{
///
/// http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.4
///
public sealed class FunctionPrototype : FunctionInstance
{
private FunctionPrototype(Engine engine):base(engine, null, null, false)
{
}
public static FunctionPrototype CreatePrototypeObject(Engine engine)
{
var obj = new FunctionPrototype(engine);
// The value of the [[Prototype]] internal property of the Function prototype object is the standard built-in Object prototype object
obj.Prototype = engine.Object.PrototypeObject;
obj.FastAddProperty("length", 0, false, false, false);
return obj;
}
public void Configure()
{
FastAddProperty("apply", new ClrFunctionInstance