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:
parent
68bfb46a6f
commit
22413ef729
Notes:
sideshowbarker
2024-07-18 19:05:45 +09:00
Author: https://github.com/Dexesttp
Commit: 22413ef729
Pull-request: https://github.com/SerenityOS/serenity/pull/6610
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/linusg
16 changed files with 593 additions and 1 deletions
|
@ -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() { ... }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue