summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Bindings/Wrappable.h
AgeCommit message (Collapse)Author
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling
2020-07-21LibWeb: Use "namespace Web::Foo {" since C++20 allows it :^)Andreas Kling
Thanks @nico for teaching me about this!
2020-06-23LibWeb: Make wrapper factory functions take JS::GlobalObject&Andreas Kling
Instead of taking the JS::Heap&. This allows us to get rid of some calls to JS::Interpreter::global_object(). We're getting closer and closer to multiple global objects. :^)
2020-06-20LibWeb: Split JS wrapper constructors into construct/initializeAndreas Kling
2020-06-20LibJS: Move native objects towards two-pass constructionAndreas Kling
To make sure that everything is set up correctly in objects before we start adding properties to them, we split cell allocation into 3 steps: 1. Allocate a cell of appropriate size from the Heap 2. Call the C++ constructor on the cell 3. Call initialize() on the constructed object The job of initialize() is to define all the initial properties. Doing it in a second pass guarantees that the Object has a valid Shape and can find its own GlobalObject.
2020-03-19LibWeb: Add <canvas> element and start fleshing out CRC2DAndreas Kling
This patch adds HTMLCanvasElement along with a LayoutCanvas object. The DOM and layout parts are very similar to <img> elements. The <canvas> element holds a Gfx::Bitmap which is sized according to the "width" and "height" attributes on the element. Calling .getContext("2d") on a <canvas> element gives you a context object that draws into the underlying Gfx::Bitmap of the <canvas>. The context weakly points to the <canvas> which allows it to outlive the canvas element if needed. This is really quite cool. :^)
2020-03-16LibJS: Add "Heap" and "Runtime" subdirectoriesAndreas Kling
Let's try to keep LibJS tidy as it expands. :^)
2020-03-15LibWeb: Add missing copyright headersAndreas Kling
2020-03-14LibWeb: Start implementing basic JavaScript DOM bindingsAndreas Kling
This patch introduces the Wrapper and Wrappable classes. Node now inherits from Wrappable, and can be wrapped in a GC-allocated Bindings::NodeWrapper object. The only property we expose right now is the very simple nodeName property. When a Document's JS::Interpreter is first instantiated, we add a "document" property with a DocumentWrapper object to the global object. This is pretty cool! :^)