mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00: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
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