1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

LibWeb: Add WebSocket bindings

The WebSocket bindings match the original specification from the
WHATWG living standard, but do not match the later update of the
standard that involves FETCH. The FETCH update will be handled later
since the changes would also affect XMLHttpRequest.
This commit is contained in:
DexesTTP 2021-04-24 13:54:24 +02:00 committed by Linus Groh
parent 68bfb46a6f
commit 22413ef729
Notes: sideshowbarker 2024-07-18 19:05:45 +09:00
16 changed files with 593 additions and 1 deletions

View file

@ -645,6 +645,12 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
auto @cpp_name@ = @js_name@@js_suffix@.to_u32(global_object);
if (vm.exception())
@return_statement@
)~~~");
} else if (parameter.type.name == "unsigned short") {
scoped_generator.append(R"~~~(
auto @cpp_name@ = (u16)@js_name@@js_suffix@.to_u32(global_object);
if (vm.exception())
@return_statement@
)~~~");
} else if (parameter.type.name == "EventHandler") {
// x.onfoo = function() { ... }