00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "kjs_window.h"
00022 #include "kjs_events.h"
00023 #include "kjs_events.lut.h"
00024 #include "kjs_views.h"
00025 #include "kjs_proxy.h"
00026 #include "xml/dom_nodeimpl.h"
00027 #include "xml/dom_docimpl.h"
00028 #include "xml/dom2_eventsimpl.h"
00029 #include "rendering/render_object.h"
00030
00031 #include <kdebug.h>
00032
00033 using namespace KJS;
00034
00035
00036
00037 JSEventListener::JSEventListener(Object _listener, const Object &_win, bool _html)
00038 : listener( _listener ), html( _html ), win( _win )
00039 {
00040
00041 static_cast<Window*>(win.imp())->jsEventListeners.append(this);
00042 }
00043
00044 JSEventListener::~JSEventListener()
00045 {
00046 static_cast<Window*>(win.imp())->jsEventListeners.removeRef(this);
00047
00048 }
00049
00050 void JSEventListener::handleEvent(DOM::Event &evt)
00051 {
00052 #ifdef KJS_DEBUGGER
00053 if (KJSDebugWin::instance() && KJSDebugWin::instance()->inSession())
00054 return;
00055 #endif
00056 KHTMLPart *part = static_cast<Window*>(win.imp())->part();
00057 KJSProxy *proxy = 0L;
00058 if (part)
00059 proxy = KJSProxy::proxy( part );
00060
00061 if (proxy && listener.implementsCall()) {
00062 ref();
00063
00064 KJS::ScriptInterpreter *interpreter = static_cast<KJS::ScriptInterpreter *>(proxy->interpreter());
00065 ExecState *exec = interpreter->globalExec();
00066
00067 List args;
00068 args.append(getDOMEvent(exec,evt));
00069
00070
00071
00072 Object thisObj = Object::dynamicCast(getDOMNode(exec,evt.currentTarget()));
00073 List scope;
00074 List oldScope = listener.scope();
00075 if ( thisObj.isValid() ) {
00076 scope = static_cast<DOMNode*>(thisObj.imp())->eventHandlerScope(exec);
00077 if ( !scope.isEmpty() ) {
00078 List curScope = oldScope.copy();
00079 curScope.prependList( scope );
00080 listener.setScope( curScope );
00081 }
00082 }
00083 else {
00084 if ( m_hackThisObj.isValid() )
00085 thisObj = m_hackThisObj;
00086 else
00087 kdWarning() << "Null 'this' object! evt=" << evt.type().string() << " currentTarget==" << evt.currentTarget().handle() << endl;
00088 }
00089
00090 Window *window = static_cast<Window*>(win.imp());
00091
00092 window->setCurrentEvent( &evt );
00093
00094 interpreter->setCurrentEvent( &evt );
00095
00096 KJSCPUGuard guard;
00097 guard.start();
00098 Value retval = listener.call(exec, thisObj, args);
00099 guard.stop();
00100
00101 if ( !scope.isEmpty() ) {
00102 listener.setScope( oldScope );
00103 }
00104
00105 window->setCurrentEvent( 0 );
00106 interpreter->setCurrentEvent( 0 );
00107 if ( exec->hadException() )
00108 exec->clearException();
00109 else
00110 {
00111 QVariant ret = ValueToVariant(exec, retval);
00112 if (ret.type() == QVariant::Bool && ret.toBool() == false)
00113 evt.preventDefault();
00114 }
00115 window->afterScriptExecution();
00116 deref();
00117 }
00118 }
00119
00120 DOM::DOMString JSEventListener::eventListenerType()
00121 {
00122 if (html)
00123 return "_khtml_HTMLEventListener";
00124 else
00125 return "_khtml_JSEventListener";
00126 }
00127
00128 Value KJS::getNodeEventListener(DOM::Node n, int eventId)
00129 {
00130 DOM::EventListener *listener = n.handle()->getHTMLEventListener(eventId);
00131 if (listener)
00132 return static_cast<JSEventListener*>(listener)->listenerObj();
00133 else
00134 return Null();
00135 }
00136
00137
00138
00139 const ClassInfo EventConstructor::info = { "EventConstructor", 0, &EventConstructorTable, 0 };
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165 EventConstructor::EventConstructor(ExecState *exec)
00166 : DOMObject(exec->interpreter()->builtinObjectPrototype())
00167 {
00168 }
00169
00170 Value EventConstructor::tryGet(ExecState *exec, const UString &p) const
00171 {
00172 return DOMObjectLookupGetValue<EventConstructor, DOMObject>(exec,p,&EventConstructorTable,this);
00173 }
00174
00175 Value EventConstructor::getValueProperty(ExecState *, int token) const
00176 {
00177
00178 return Number(token);
00179 }
00180
00181 Value KJS::getEventConstructor(ExecState *exec)
00182 {
00183 return cacheGlobalObject<EventConstructor>(exec, "[[event.constructor]]");
00184 }
00185
00186
00187
00188 const ClassInfo DOMEvent::info = { "Event", 0, &DOMEventTable, 0 };
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208 DEFINE_PROTOTYPE("DOMEvent", DOMEventProto)
00209 IMPLEMENT_PROTOFUNC_DOM(DOMEventProtoFunc)
00210 IMPLEMENT_PROTOTYPE(DOMEventProto, DOMEventProtoFunc)
00211
00212 DOMEvent::DOMEvent(ExecState *exec, DOM::Event e)
00213 : DOMObject(DOMEventProto::self(exec)), event(e) { }
00214
00215 DOMEvent::~DOMEvent()
00216 {
00217 ScriptInterpreter::forgetDOMObject(event.handle());
00218 }
00219
00220 Value DOMEvent::tryGet(ExecState *exec, const UString &p) const
00221 {
00222 #ifdef KJS_VERBOSE
00223 kdDebug() << "KJS::DOMEvent::tryGet " << p.qstring() << endl;
00224 #endif
00225 return DOMObjectLookupGetValue<DOMEvent,DOMObject>(exec, p, &DOMEventTable, this );
00226 }
00227
00228 Value DOMEvent::getValueProperty(ExecState *exec, int token) const
00229 {
00230 switch (token) {
00231 case Type:
00232 return String(event.type());
00233 case Target:
00234 case SrcElement:
00235 return getDOMNode(exec,event.target());
00236 case CurrentTarget:
00237 return getDOMNode(exec,event.currentTarget());
00238 case EventPhase:
00239 return Number((unsigned int)event.eventPhase());
00240 case Bubbles:
00241 case CancelBubble:
00242 return Boolean(event.bubbles());
00243 case Cancelable:
00244 return Boolean(event.cancelable());
00245 case TimeStamp:
00246 return Number((long unsigned int)event.timeStamp());
00247 default:
00248 kdWarning() << "Unhandled token in DOMEvent::getValueProperty : " << token << endl;
00249 return Value();
00250 }
00251 }
00252
00253 void DOMEvent::tryPut(ExecState *exec, const UString &propertyName,
00254 const Value& value, int attr)
00255 {
00256 DOMObjectLookupPut<DOMEvent, DOMObject>(exec, propertyName, value, attr,
00257 &DOMEventTable, this);
00258 }
00259
00260 void DOMEvent::putValueProperty(ExecState *exec, int token, const Value& value, int)
00261 {
00262 switch (token) {
00263 case ReturnValue:
00264 if (value.toBoolean(exec))
00265 event.preventDefault();
00266 break;
00267 case CancelBubble:
00268 if (value.toBoolean(exec))
00269 event.stopPropagation();
00270 break;
00271 default:
00272 break;
00273 }
00274 }
00275
00276 Value DOMEventProtoFunc::tryCall(ExecState *exec, Object & thisObj, const List &args)
00277 {
00278 KJS_CHECK_THIS( KJS::DOMEvent, thisObj );
00279 DOM::Event event = static_cast<DOMEvent *>( thisObj.imp() )->toEvent();
00280 switch (id) {
00281 case DOMEvent::StopPropagation:
00282 event.stopPropagation();
00283 case DOMEvent::PreventDefault:
00284 event.preventDefault();
00285 return Undefined();
00286 case DOMEvent::InitEvent:
00287 event.initEvent(args[0].toString(exec).string(),args[1].toBoolean(exec),args[2].toBoolean(exec));
00288 return Undefined();
00289 };
00290 return Undefined();
00291 }
00292
00293 Value KJS::getDOMEvent(ExecState *exec, DOM::Event e)
00294 {
00295 DOMObject *ret;
00296 if (e.isNull())
00297 return Null();
00298 ScriptInterpreter* interp = static_cast<ScriptInterpreter *>(exec->interpreter());
00299 if ((ret = interp->getDOMObject(e.handle())))
00300 return Value(ret);
00301
00302 DOM::DOMString module = e.eventModuleName();
00303 if (module == "UIEvents")
00304 ret = new DOMUIEvent(exec, static_cast<DOM::UIEvent>(e));
00305 else if (module == "MouseEvents")
00306 ret = new DOMMouseEvent(exec, static_cast<DOM::MouseEvent>(e));
00307 else if (module == "TextEvents")
00308 ret = new DOMTextEvent(exec, static_cast<DOM::TextEvent>(e));
00309 else if (module == "MutationEvents")
00310 ret = new DOMMutationEvent(exec, static_cast<DOM::MutationEvent>(e));
00311 else
00312 ret = new DOMEvent(exec, e);
00313
00314 interp->putDOMObject(e.handle(),ret);
00315 return Value(ret);
00316 }
00317
00318 DOM::Event KJS::toEvent(const Value& val)
00319 {
00320 Object obj = Object::dynamicCast(val);
00321 if (obj.isNull() || !obj.inherits(&DOMEvent::info))
00322 return DOM::Event();
00323
00324 const DOMEvent *dobj = static_cast<const DOMEvent*>(obj.imp());
00325 return dobj->toEvent();
00326 }
00327
00328
00329
00330
00331 const ClassInfo EventExceptionConstructor::info = { "EventExceptionConstructor", 0, &EventExceptionConstructorTable, 0 };
00332
00333
00334
00335
00336
00337 EventExceptionConstructor::EventExceptionConstructor(ExecState *exec)
00338 : DOMObject(exec->interpreter()->builtinObjectPrototype())
00339 {
00340 }
00341
00342 Value EventExceptionConstructor::tryGet(ExecState *exec, const UString &p) const
00343 {
00344 return DOMObjectLookupGetValue<EventExceptionConstructor, DOMObject>(exec,p,&EventExceptionConstructorTable,this);
00345 }
00346
00347 Value EventExceptionConstructor::getValueProperty(ExecState *, int token) const
00348 {
00349
00350 return Number(token);
00351 }
00352
00353 Value KJS::getEventExceptionConstructor(ExecState *exec)
00354 {
00355 return cacheGlobalObject<EventExceptionConstructor>(exec, "[[eventException.constructor]]");
00356 }
00357
00358
00359
00360 const ClassInfo DOMUIEvent::info = { "UIEvent", &DOMEvent::info, &DOMUIEventTable, 0 };
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370 DEFINE_PROTOTYPE("DOMUIEvent",DOMUIEventProto)
00371 IMPLEMENT_PROTOFUNC_DOM(DOMUIEventProtoFunc)
00372 IMPLEMENT_PROTOTYPE_WITH_PARENT(DOMUIEventProto,DOMUIEventProtoFunc,DOMEventProto)
00373
00374 DOMUIEvent::~DOMUIEvent()
00375 {
00376 }
00377
00378 Value DOMUIEvent::tryGet(ExecState *exec, const UString &p) const
00379 {
00380 return DOMObjectLookupGetValue<DOMUIEvent,DOMEvent>(exec,p,&DOMUIEventTable,this);
00381 }
00382
00383 Value DOMUIEvent::getValueProperty(ExecState *exec, int token) const
00384 {
00385 switch (token) {
00386 case View:
00387 return getDOMAbstractView(exec,static_cast<DOM::UIEvent>(event).view());
00388 case Detail:
00389 return Number(static_cast<DOM::UIEvent>(event).detail());
00390 default:
00391 kdWarning() << "Unhandled token in DOMUIEvent::getValueProperty : " << token << endl;
00392 return Value();
00393 }
00394 }
00395
00396 Value DOMUIEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
00397 {
00398 KJS_CHECK_THIS( KJS::DOMUIEvent, thisObj );
00399 DOM::UIEvent uiEvent = static_cast<DOMUIEvent *>(thisObj.imp())->toUIEvent();
00400 switch (id) {
00401 case DOMUIEvent::InitUIEvent: {
00402 DOM::AbstractView v = toAbstractView(args[3]);
00403 static_cast<DOM::UIEvent>(uiEvent).initUIEvent(args[0].toString(exec).string(),
00404 args[1].toBoolean(exec),
00405 args[2].toBoolean(exec),
00406 v,
00407 args[4].toInteger(exec));
00408 }
00409 return Undefined();
00410 }
00411 return Undefined();
00412 }
00413
00414
00415
00416 const ClassInfo DOMMouseEvent::info = { "MouseEvent", &DOMUIEvent::info, &DOMMouseEventTable, 0 };
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441 DEFINE_PROTOTYPE("DOMMouseEvent",DOMMouseEventProto)
00442 IMPLEMENT_PROTOFUNC_DOM(DOMMouseEventProtoFunc)
00443 IMPLEMENT_PROTOTYPE_WITH_PARENT(DOMMouseEventProto,DOMMouseEventProtoFunc,DOMUIEventProto)
00444
00445 DOMMouseEvent::~DOMMouseEvent()
00446 {
00447 }
00448
00449 Value DOMMouseEvent::tryGet(ExecState *exec, const UString &p) const
00450 {
00451 #ifdef KJS_VERBOSE
00452 kdDebug(6070) << "DOMMouseEvent::tryGet " << p.qstring() << endl;
00453 #endif
00454 return DOMObjectLookupGetValue<DOMMouseEvent,DOMUIEvent>(exec,p,&DOMMouseEventTable,this);
00455 }
00456
00457 Value DOMMouseEvent::getValueProperty(ExecState *exec, int token) const
00458 {
00459 switch (token) {
00460 case ScreenX:
00461 return Number(static_cast<DOM::MouseEvent>(event).screenX());
00462 case ScreenY:
00463 return Number(static_cast<DOM::MouseEvent>(event).screenY());
00464 case ClientX:
00465 case X:
00466 return Number(static_cast<DOM::MouseEvent>(event).clientX());
00467 case ClientY:
00468 case Y:
00469 return Number(static_cast<DOM::MouseEvent>(event).clientY());
00470 case OffsetX:
00471 case OffsetY:
00472 {
00473 DOM::Node node = event.target();
00474 node.handle()->getDocument()->updateRendering();
00475 khtml::RenderObject *rend = node.handle() ? node.handle()->renderer() : 0L;
00476 int x = static_cast<DOM::MouseEvent>(event).clientX();
00477 int y = static_cast<DOM::MouseEvent>(event).clientY();
00478 if ( rend ) {
00479 int xPos, yPos;
00480 if ( rend->absolutePosition( xPos, yPos ) ) {
00481 kdDebug() << "DOMMouseEvent::getValueProperty rend=" << rend << " xPos=" << xPos << " yPos=" << yPos << endl;
00482 x -= xPos;
00483 y -= yPos;
00484 }
00485 }
00486 return Number( token == OffsetX ? x : y );
00487 }
00488 case CtrlKey:
00489 return Boolean(static_cast<DOM::MouseEvent>(event).ctrlKey());
00490 case ShiftKey:
00491 return Boolean(static_cast<DOM::MouseEvent>(event).shiftKey());
00492 case AltKey:
00493 return Boolean(static_cast<DOM::MouseEvent>(event).altKey());
00494 case MetaKey:
00495 return Boolean(static_cast<DOM::MouseEvent>(event).metaKey());
00496 case Button:
00497 {
00498
00499
00500 int domButton = static_cast<DOM::MouseEvent>(event).button();
00501 int button = domButton==0 ? 1 : domButton==1 ? 4 : domButton==2 ? 2 : 0;
00502 return Number( (unsigned int)button );
00503 }
00504 case ToElement:
00505
00506 if (event.handle()->id() == DOM::EventImpl::MOUSEOUT_EVENT)
00507 return getDOMNode(exec,static_cast<DOM::MouseEvent>(event).relatedTarget());
00508 return getDOMNode(exec,static_cast<DOM::MouseEvent>(event).target());
00509 case FromElement:
00510
00511
00512 if (event.handle()->id() == DOM::EventImpl::MOUSEOUT_EVENT)
00513 return getDOMNode(exec,static_cast<DOM::MouseEvent>(event).target());
00514
00515 case RelatedTarget:
00516 return getDOMNode(exec,static_cast<DOM::MouseEvent>(event).relatedTarget());
00517 default:
00518 kdWarning() << "Unhandled token in DOMMouseEvent::getValueProperty : " << token << endl;
00519 return Value();
00520 }
00521 }
00522
00523 Value DOMMouseEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
00524 {
00525 KJS_CHECK_THIS( KJS::DOMMouseEvent, thisObj );
00526 DOM::MouseEvent mouseEvent = static_cast<DOMMouseEvent *>(thisObj.imp())->toMouseEvent();
00527 switch (id) {
00528 case DOMMouseEvent::InitMouseEvent:
00529 mouseEvent.initMouseEvent(args[0].toString(exec).string(),
00530 args[1].toBoolean(exec),
00531 args[2].toBoolean(exec),
00532 toAbstractView(args[3]),
00533 args[4].toInteger(exec),
00534 args[5].toInteger(exec),
00535 args[6].toInteger(exec),
00536 args[7].toInteger(exec),
00537 args[8].toInteger(exec),
00538 args[9].toBoolean(exec),
00539 args[10].toBoolean(exec),
00540 args[11].toBoolean(exec),
00541 args[12].toBoolean(exec),
00542 args[13].toInteger(exec),
00543 toNode(args[14]));
00544 return Undefined();
00545 }
00546 return Undefined();
00547 }
00548
00549
00550
00551 const ClassInfo DOMTextEvent::info = { "TextEvent", &DOMUIEvent::info, &DOMTextEventTable, 0 };
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568 DEFINE_PROTOTYPE("DOMTextEvent",DOMTextEventProto)
00569 IMPLEMENT_PROTOFUNC_DOM(DOMTextEventProtoFunc)
00570 IMPLEMENT_PROTOTYPE_WITH_PARENT(DOMTextEventProto,DOMTextEventProtoFunc,DOMUIEventProto)
00571
00572 DOMTextEvent::~DOMTextEvent()
00573 {
00574 }
00575
00576 Value DOMTextEvent::tryGet(ExecState *exec, const UString &p) const
00577 {
00578 #ifdef KJS_VERBOSE
00579 kdDebug(6070) << "DOMTextEvent::tryGet " << p.qstring() << endl;
00580 #endif
00581 return DOMObjectLookupGetValue<DOMTextEvent,DOMUIEvent>(exec,p,&DOMTextEventTable,this);
00582 }
00583
00584 Value DOMTextEvent::getValueProperty(ExecState *, int token) const
00585 {
00586 switch (token) {
00587 case Key:
00588 return Number(static_cast<DOM::TextEvent>(event).keyVal());
00589 case VirtKey:
00590 return Number(static_cast<DOM::TextEvent>(event).virtKeyVal());
00591 case OutputString:
00592 return String(static_cast<DOM::TextEvent>(event).outputString());
00593 case InputGenerated:
00594 return Boolean(static_cast<DOM::TextEvent>(event).inputGenerated());
00595 case NumPad:
00596 return Boolean(static_cast<DOM::TextEvent>(event).numPad());
00597 default:
00598 kdWarning() << "Unhandled token in DOMTextEvent::getValueProperty : " << token << endl;
00599 return Value();
00600 }
00601 }
00602
00603 Value DOMTextEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
00604 {
00605 KJS_CHECK_THIS( KJS::DOMTextEvent, thisObj );
00606 DOM::TextEvent keyEvent = static_cast<DOMTextEvent *>(thisObj.imp())->toTextEvent();
00607 switch (id) {
00608 case DOMTextEvent::InitTextEvent:
00609 keyEvent.initTextEvent(args[0].toString(exec).string(),
00610 args[1].toBoolean(exec),
00611 args[2].toBoolean(exec),
00612 toAbstractView(args[3]),
00613 args[4].toInteger(exec),
00614 args[5].toString(exec).string(),
00615 args[6].toInteger(exec),
00616 args[7].toInteger(exec),
00617 args[8].toBoolean(exec),
00618 args[9].toBoolean(exec));
00619
00620 return Undefined();
00621 }
00622 return Undefined();
00623 }
00624
00625
00626
00627 const ClassInfo MutationEventConstructor::info = { "MutationEventConstructor", 0, &MutationEventConstructorTable, 0 };
00628
00629
00630
00631
00632
00633
00634
00635 MutationEventConstructor::MutationEventConstructor(ExecState* exec)
00636 : DOMObject(exec->interpreter()->builtinObjectPrototype())
00637 {
00638 }
00639
00640 Value MutationEventConstructor::tryGet(ExecState *exec, const UString &p) const
00641 {
00642 return DOMObjectLookupGetValue<MutationEventConstructor,DOMObject>(exec,p,&MutationEventConstructorTable,this);
00643 }
00644
00645 Value MutationEventConstructor::getValueProperty(ExecState *, int token) const
00646 {
00647
00648 return Number(token);
00649 }
00650
00651 Value KJS::getMutationEventConstructor(ExecState *exec)
00652 {
00653 return cacheGlobalObject<MutationEventConstructor>(exec, "[[mutationEvent.constructor]]");
00654 }
00655
00656
00657
00658 const ClassInfo DOMMutationEvent::info = { "MutationEvent", &DOMEvent::info, &DOMMutationEventTable, 0 };
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671 DEFINE_PROTOTYPE("DOMMutationEvent",DOMMutationEventProto)
00672 IMPLEMENT_PROTOFUNC_DOM(DOMMutationEventProtoFunc)
00673 IMPLEMENT_PROTOTYPE_WITH_PARENT(DOMMutationEventProto,DOMMutationEventProtoFunc,DOMEventProto)
00674
00675 DOMMutationEvent::~DOMMutationEvent()
00676 {
00677 }
00678
00679 Value DOMMutationEvent::tryGet(ExecState *exec, const UString &p) const
00680 {
00681 return DOMObjectLookupGetValue<DOMMutationEvent,DOMEvent>(exec,p,&DOMMutationEventTable,this);
00682 }
00683
00684 Value DOMMutationEvent::getValueProperty(ExecState *exec, int token) const
00685 {
00686 switch (token) {
00687 case RelatedNode:
00688 return getDOMNode(exec,static_cast<DOM::MutationEvent>(event).relatedNode());
00689 case PrevValue:
00690 return String(static_cast<DOM::MutationEvent>(event).prevValue());
00691 case NewValue:
00692 return String(static_cast<DOM::MutationEvent>(event).newValue());
00693 case AttrName:
00694 return String(static_cast<DOM::MutationEvent>(event).attrName());
00695 case AttrChange:
00696 return Number((unsigned int)static_cast<DOM::MutationEvent>(event).attrChange());
00697 default:
00698 kdWarning() << "Unhandled token in DOMMutationEvent::getValueProperty : " << token << endl;
00699 return Value();
00700 }
00701 }
00702
00703 Value DOMMutationEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
00704 {
00705 KJS_CHECK_THIS( KJS::DOMMutationEvent, thisObj );
00706 DOM::MutationEvent mutationEvent = static_cast<DOMMutationEvent *>(thisObj.imp())->toMutationEvent();
00707 switch (id) {
00708 case DOMMutationEvent::InitMutationEvent:
00709 mutationEvent.initMutationEvent(args[0].toString(exec).string(),
00710 args[1].toBoolean(exec),
00711 args[2].toBoolean(exec),
00712 toNode(args[3]),
00713 args[4].toString(exec).string(),
00714 args[5].toString(exec).string(),
00715 args[6].toString(exec).string(),
00716 args[7].toInteger(exec));
00717 return Undefined();
00718 }
00719 return Undefined();
00720 }