mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:58:12 +00:00
LibWeb: Add input element valueAsDate property
This commit is contained in:
parent
be511fdcf7
commit
cf69fd0a09
10 changed files with 314 additions and 9 deletions
|
@ -630,7 +630,13 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
|
|||
auto @cpp_name@ = JS::make_handle(&static_cast<JS::Promise&>(@js_name@@js_suffix@.as_object()));
|
||||
)~~~");
|
||||
} else if (parameter.type->name() == "object") {
|
||||
if (optional) {
|
||||
if (parameter.type->is_nullable()) {
|
||||
scoped_generator.append(R"~~~(
|
||||
Optional<JS::Handle<JS::Object>> @cpp_name@;
|
||||
if (!@js_name@@js_suffix@.is_null() && !@js_name@@js_suffix@.is_undefined())
|
||||
@cpp_name@ = JS::make_handle(TRY(@js_name@@js_suffix@.to_object(vm)));
|
||||
)~~~");
|
||||
} else if (optional) {
|
||||
scoped_generator.append(R"~~~(
|
||||
Optional<JS::Handle<JS::Object>> @cpp_name@;
|
||||
if (!@js_name@@js_suffix@.is_undefined())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue