diff --git a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp index dac3bcb776..5e314a8674 100644 --- a/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp +++ b/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp @@ -741,7 +741,7 @@ static @fully_qualified_name@* impl_from(JS::VM& vm, JS::GlobalObject& global_ob auto scoped_generator = generator.fork(); scoped_generator.set("return_type", return_type.name); - if (return_type.name == "void") { + if (return_type.name == "undefined") { scoped_generator.append(R"~~~( return JS::js_undefined(); )~~~"); @@ -918,7 +918,7 @@ JS_DEFINE_NATIVE_FUNCTION(@wrapper_class@::@function.name:snakecase@) function_generator.set(".arguments", arguments_builder.string_view()); - if (function.return_type.name != "void") { + if (function.return_type.name != "undefined") { function_generator.append(R"~~~( auto retval = impl->@function.name:snakecase@(@.arguments@); )~~~"); diff --git a/Libraries/LibWeb/DOM/Element.idl b/Libraries/LibWeb/DOM/Element.idl index fe5c462a48..386b44db3a 100644 --- a/Libraries/LibWeb/DOM/Element.idl +++ b/Libraries/LibWeb/DOM/Element.idl @@ -3,7 +3,7 @@ interface Element : Node { readonly attribute DOMString tagName; DOMString? getAttribute(DOMString qualifiedName); - void setAttribute(DOMString qualifiedName, DOMString value); + undefined setAttribute(DOMString qualifiedName, DOMString value); readonly attribute Element? firstElementChild; readonly attribute Element? lastElementChild; diff --git a/Libraries/LibWeb/DOM/Event.idl b/Libraries/LibWeb/DOM/Event.idl index 51d50b2c53..a577092cae 100644 --- a/Libraries/LibWeb/DOM/Event.idl +++ b/Libraries/LibWeb/DOM/Event.idl @@ -7,14 +7,14 @@ interface Event { readonly attribute unsigned short eventPhase; - void stopPropagation(); + undefined stopPropagation(); attribute boolean cancelBubble; - void stopImmediatePropagation(); + undefined stopImmediatePropagation(); readonly attribute boolean bubbles; readonly attribute boolean cancelable; attribute boolean returnValue; - void preventDefault(); + undefined preventDefault(); readonly attribute boolean defaultPrevented; readonly attribute boolean composed; diff --git a/Libraries/LibWeb/DOM/EventTarget.idl b/Libraries/LibWeb/DOM/EventTarget.idl index 140fa4f39a..2dacfae0e2 100644 --- a/Libraries/LibWeb/DOM/EventTarget.idl +++ b/Libraries/LibWeb/DOM/EventTarget.idl @@ -1,6 +1,6 @@ interface EventTarget { - void addEventListener(DOMString type, EventListener? callback); - void removeEventListener(DOMString type, EventListener? callback); + undefined addEventListener(DOMString type, EventListener? callback); + undefined removeEventListener(DOMString type, EventListener? callback); }; diff --git a/Libraries/LibWeb/HTML/CanvasRenderingContext2D.idl b/Libraries/LibWeb/HTML/CanvasRenderingContext2D.idl index a86dcaf76b..bcfa544c67 100644 --- a/Libraries/LibWeb/HTML/CanvasRenderingContext2D.idl +++ b/Libraries/LibWeb/HTML/CanvasRenderingContext2D.idl @@ -1,28 +1,28 @@ interface CanvasRenderingContext2D { - void fillRect(double x, double y, double w, double h); - void strokeRect(double x, double y, double w, double h); + undefined fillRect(double x, double y, double w, double h); + undefined strokeRect(double x, double y, double w, double h); - void scale(double x, double y); - void translate(double x, double y); - void rotate(double radians); + undefined scale(double x, double y); + undefined translate(double x, double y); + undefined rotate(double radians); - void beginPath(); - void closePath(); - void fill(DOMString fillRule); - void stroke(); - void moveTo(double x, double y); - void lineTo(double x, double y); - void quadraticCurveTo(double cpx, double cpy, double x, double y); + undefined beginPath(); + undefined closePath(); + undefined fill(DOMString fillRule); + undefined stroke(); + undefined moveTo(double x, double y); + undefined lineTo(double x, double y); + undefined quadraticCurveTo(double cpx, double cpy, double x, double y); - void drawImage(HTMLImageElement image, double dx, double dy); + undefined drawImage(HTMLImageElement image, double dx, double dy); attribute DOMString fillStyle; attribute DOMString strokeStyle; attribute double lineWidth; ImageData createImageData(double sw, double sh); - void putImageData(ImageData imagedata, double dx, double dy); + undefined putImageData(ImageData imagedata, double dx, double dy); readonly attribute HTMLCanvasElement canvas; diff --git a/Libraries/LibWeb/HTML/HTMLFormElement.idl b/Libraries/LibWeb/HTML/HTMLFormElement.idl index fd32600233..81d4fe37f4 100644 --- a/Libraries/LibWeb/HTML/HTMLFormElement.idl +++ b/Libraries/LibWeb/HTML/HTMLFormElement.idl @@ -5,6 +5,6 @@ interface HTMLFormElement : HTMLElement { [Reflect=accept-charset] attribute DOMString acceptCharset; [Reflect=novalidate] attribute boolean noValidate; - void submit(); + undefined submit(); };