mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Add IsHTMLDDA feature
* https://www.ecma-international.org/ecma-262/#sec-IsHTMLDDA-internal-slot * IsHTMLDDA internal slot is an ECMAScript feature for Web Browsers * IsHTMLDDA is currently enabled only for test mode (we can enable it later if it is really used by third party app) * some related operations are optionally fixed Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
ca012fe376
commit
e0bd962e6e
11 changed files with 93 additions and 32 deletions
|
|
@ -322,6 +322,11 @@ static ValueRef* builtin262EvalScript(ExecutionStateRef* state, ValueRef* thisVa
|
|||
auto script = state->context()->scriptParser()->initializeScript(src, StringRef::createFromASCII("$262.evalScript input"), false).fetchScriptThrowsExceptionIfParseError(state);
|
||||
return script->execute(state);
|
||||
}
|
||||
|
||||
static ValueRef* builtin262IsHTMLDDA(ExecutionStateRef* state, ValueRef* thisValue, size_t argc, ValueRef** argv, bool isConstructCall)
|
||||
{
|
||||
return ValueRef::createNull();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -430,7 +435,10 @@ PersistentRefHolder<ContextRef> createEscargotContext(VMInstanceRef* instance)
|
|||
}
|
||||
|
||||
{
|
||||
dollor262Object->defineDataProperty(state, StringRef::createFromASCII("IsHTMLDDA"), ValueRef::create(false), true, true, true);
|
||||
FunctionObjectRef::NativeFunctionInfo nativeFunctionInfo(AtomicStringRef::create(context, "IsHTMLDDA"), builtin262IsHTMLDDA, 0, true, false);
|
||||
FunctionObjectRef* buildFunctionObjectRef = FunctionObjectRef::create(state, nativeFunctionInfo);
|
||||
buildFunctionObjectRef->setIsHTMLDDA();
|
||||
dollor262Object->defineDataProperty(state, StringRef::createFromASCII("IsHTMLDDA"), buildFunctionObjectRef, true, true, true);
|
||||
}
|
||||
|
||||
context->globalObject()->defineDataProperty(state, StringRef::createFromASCII("$262"), dollor262Object, true, false, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue