本文整理汇总了C++中JSDOMWindowShell::get方法的典型用法代码示例。如果您正苦于以下问题:C++ JSDOMWindowShell::get方法的具体用法?C++ JSDOMWindowShell::get怎么用?C++ JSDOMWindowShell::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSDOMWindowShell
的用法示例。
在下文中一共展示了JSDOMWindowShell::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: open
JSValue JSHTMLDocument::open(ExecState* exec)
{
// For compatibility with other browsers, pass open calls with more than 2 parameters to the window.
if (exec->argumentCount() > 2) {
Frame* frame = static_cast<HTMLDocument*>(impl())->frame();
if (frame) {
JSDOMWindowShell* wrapper = toJSDOMWindowShell(frame, currentWorld(exec));
if (wrapper) {
JSValue function = wrapper->get(exec, Identifier(exec, "open"));
CallData callData;
CallType callType = ::getCallData(function, callData);
if (callType == CallTypeNone)
return throwTypeError(exec);
return JSC::call(exec, function, callType, callData, wrapper, ArgList(exec));
}
}
return jsUndefined();
}
// document.open clobbers the security context of the document and
// aliases it with the active security context.
Document* activeDocument = asJSDOMWindow(exec->lexicalGlobalObject())->impl()->document();
// In the case of two parameters or fewer, do a normal document open.
static_cast<HTMLDocument*>(impl())->open(activeDocument);
return this;
}
示例2: open
JSValue JSHTMLDocument::open(ExecState& state)
{
// For compatibility with other browsers, pass open calls with more than 2 parameters to the window.
if (state.argumentCount() > 2) {
if (Frame* frame = wrapped().frame()) {
JSDOMWindowShell* wrapper = toJSDOMWindowShell(frame, currentWorld(&state));
if (wrapper) {
JSValue function = wrapper->get(&state, Identifier::fromString(&state, "open"));
CallData callData;
CallType callType = ::getCallData(function, callData);
if (callType == CallTypeNone)
return throwTypeError(&state);
return JSC::call(&state, function, callType, callData, wrapper, ArgList(&state));
}
}
return jsUndefined();
}
// document.open clobbers the security context of the document and
// aliases it with the active security context.
Document* activeDocument = asJSDOMWindow(state.lexicalGlobalObject())->wrapped().document();
// In the case of two parameters or fewer, do a normal document open.
wrapped().open(activeDocument);
return this;
}