mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Generate Event and MouseEvent bindings from IDL :^)
We still have to hand-write a function to turn an Event& into a wrapper but this is still a hue improvement. Eventually we'll find a way to auto-generate that function as well.
This commit is contained in:
@@ -322,6 +322,8 @@ static bool should_emit_wrapper_factory(const IDL::Interface& interface)
|
||||
return false;
|
||||
if (interface.name.ends_with("Element"))
|
||||
return false;
|
||||
if (interface.name.ends_with("Event"))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -521,7 +523,7 @@ void generate_implementation(const IDL::Interface& interface)
|
||||
out() << " new_array->indexed_properties().append(wrap(interpreter.heap(), element));";
|
||||
out() << " }";
|
||||
out() << " return new_array;";
|
||||
} else if (return_type.name == "long") {
|
||||
} else if (return_type.name == "long" || return_type.name == "double") {
|
||||
out() << " return JS::Value(retval);";
|
||||
} else if (return_type.name == "Uint8ClampedArray") {
|
||||
out() << " return retval;";
|
||||
|
||||
Reference in New Issue
Block a user