summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h
AgeCommit message (Collapse)Author
2022-02-07LibWeb: Implement ErrorEventLuke Wilde
This will be used by the new EventTarget to check if it needs to do special error event handling. Currently it isn't used for anything else.
2022-02-07LibWeb: Add a proper FocusEvent interface for "focus" and "blur" eventsAndreas Kling
2022-02-03LibWeb: Expose KeyboardEvent's constructor on the window objectAndreas Kling
2022-02-03LibWeb: Add barebones CanvasGradient objectAndreas Kling
Also add the CanvasRenderingContext2D APIs to go along with it. Note that it can't be used for anything yet.
2022-01-04LibWeb: Implement CanvasRenderingContext2D.measureTextsin-ack
This requires an implementation of the "text preparation algorithm" as specified here: html.spec.whatwg.org/multipage/canvas.html#text-preparation-algorithm However, we're missing a lot of things such as the CanvasTextDrawingStyles interface, so most of the algorithm was not implemented. Additionally, we also are not able to use a LineBox like the algorithm suggests, because our layouting infra is not up to the task yet. The prepare_text function does nothing other than figuring out the width of the given text and return glyphs with offsets at the moment.
2021-12-14LibWeb: Add the SubtleCrypto interfaceLinus Groh
Just some boilerplate code to get started :^) This adds both the SubtleCrypto constructor to the window object, as well as the crypto.subtle instance attribute.
2021-12-12LibWeb: Add the TextEncoder interfaceLinus Groh
This is from the Encoding Standard (https://encoding.spec.whatwg.org), and therefore gets its own namespace and subdirectory within LibWeb :^)
2021-10-14LibWeb: Stub out a basic IntersectionObserver interfaceTimothy Flynn
Note there are a couple of type differences between the spec and the IDL file added in this commit. For example, we will need to support a type of Variant to handle spec types such as "(double or sequence<double>)". But for now, this allows web pages to construct an IntersectionObserver with any valid type.
2021-10-11LibWeb: Implement PromiseRejectionEventLinus Groh
This paves the way for the rejectionhandled and unhandledrejection events. It's also used by core-js (in browsers, at least) to check whether Promise needs to be polyfilled, so adding it should allow more websites to leverage LibJS's native Promise implementation :^)
2021-10-11LibWeb: Stub out a basic ResizeObserver interfaceAndreas Kling
This patch establishes scaffolding for the ResizeObserver API.
2021-10-11LibWeb: Stub out a basic Selection interfaceAndreas Kling
This patch establishes scaffolding for the Selection API.
2021-10-08LibWeb: Add DOMRectReadOnly and make DOMRect inherit from itAndreas Kling
This matches the class hierarchy of the CSS Geometry Interfaces Module.
2021-10-05LibWeb: Fire MediaQueryListEvents when an MQL's match-state changesSam Atkins
The HTML event loop does a check for MQL match-state changes and dispatches the events. This requires us to keep a list of MQLs on the Document.
2021-10-03LibWeb: Add support for NodeListLuke Wilde
This introduces 3 classes: NodeList, StaticNodeList and LiveNodeList. NodeList is the base of the static and live versions. Static is a snapshot whereas live acts on the underlying data and thus inhibits the same issues we have currently with HTMLCollection. They were split into separate classes to not have them weirdly mis-mashed together. The create functions for static and live both return a NNRP to the base class. This is to prevent having to do awkward casting at creation and/or return, as the bindings expect to see the base NodeList only.
2021-09-30LibWeb: Add the Web::Crypto namespace, built-in, and getRandomValuesIdan Horowitz
Since we don't support IDL typedefs or unions yet, the responsibility of verifying the type of the argument is temporarily moved from the generated Wrapper to the implementation.
2021-09-30LibWeb: Expose CSSStyleRule on the window objectAndreas Kling
2021-09-29LibWeb: Make CSSRule and CSSRuleList available to JavaScript :^)Andreas Kling
This patch makes both of these classes inherit from RefCounted and Bindings::Wrappable, plus some minimal rejigging to allow us to keep using them internally while also exposing them to web content.
2021-09-28LibWeb: Expose CSSStyleDeclaration on the window objectAndreas Kling
2021-09-27LibWeb: Add initial support for CustomEventLuke Wilde
This is used surprisingly often. For example, it is used by a core YouTube library called Structured Page Fragments. It allows you to manually dispatch an event with arbitrary data attached to it. The only thing missing from this implementation is the constructor. This is because WrapperGenerator is currently missing dictionary capabilities.
2021-09-27LibWeb: Add some missing events in EventWrapperFactoryLuke Wilde
I noticed some events we being wrapped into a generic Event while working on CustomEvent. This also adds PageTransitionEvent's constructor to the WindowObject. I'm not sure if this is all of them.
2021-09-26LibWeb: Add support for HTMLOrSVGElement.datasetLuke Wilde
2021-09-26LibWeb: Convert HTMLCollection to use IDL special operationsLuke Wilde
2021-09-19LibWeb: Implement basic support for MessageChannel and MessagePortAndreas Kling
This patch adds a basic initial implementation of these API's. Since LibWeb currently doesn't support workers, this implementation of messaging doesn't bother with serializing and deserializing messages.
2021-09-14LibWeb: Add a bare implementation of the URL built-inIdan Horowitz
This only has the constructor implemented for now.
2021-09-13LibWeb: Add the URLSearchParams built-inIdan Horowitz
This is a very partial implementation, as some features (like 2 of the possible constructor types, iteration and the getAll method) are missing, and other's are not implemented due to the currently missing URL built-in.
2021-09-12LibWeb: Start implementing the MediaQueryList interfaceLinus Groh
2021-09-12LibWeb: Add the History object and stub pushState and replaceStateLuke Wilde
The spec allows us to optionally return from these for any reason. Our reason is that we don't have all the infrastructure in place yet to implement them.
2021-09-02LibWeb: Add initial support for AbortController and AbortSignalLuke Wilde
The DOM specification says that the primary use case for these is to give Promises abort semantics. It is also a prerequisite for Fetch, as it is used to make Fetch abortable. a
2021-07-06LibJS: Add define_direct_property and remove the define_property helperIdan Horowitz
This removes all usages of the non-standard define_property helper method and replaces all it's usages with the specification required alternative or with define_direct_property where appropriate.
2021-07-05LibWeb: Add DOMParserLuke
This allows you to invoke the HTML document parser and retrieve a document as though it was loaded as a web page, minus any scripting ability. This does not currently support XML parsing. This is used by YouTube (or more accurately, Web Components Polyfills) to polyfill templates.
2021-04-25LibWeb: Add WebSocket bindingsDexesTTP
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.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-06LibWeb: Add ProcessingInstruction nodeLuke
Not particuarly useful right now, but is used in ensure_pre_insertion_validity. I'm not totally sure on the constructor arguments.
2021-04-04LibWeb: Implement the Screen interfaceLinus Groh
https://drafts.csswg.org/cssom-view/#the-screen-interface
2021-04-03LibWeb: Set Constructor.name and Prototype.constructor of generated interfacesLinus Groh
Object introspection in the Browser's JS console is still not great, but this makes it a lot easier to find out the exact type of an object by checking its 'constructor' property. It also fixes all the things that rely on these properties being set, of course :^)
2021-03-21LibWeb: Add legacy Image factory functionLuke
2021-03-09LibWeb: Expose new CSS interfaces on the window objectLuke
2021-02-20LibWeb: Add DOM::DOMException class and bindingsLinus Groh
2021-01-23LibWeb: Add XHREventTarget and ProgressEvent constructors to WindowLuke
2021-01-23LibWeb: Generate JS bindings for XMLHttpRequest from IDL :^)Andreas Kling
Remove the hand-written XHR bindings in favor of generated ones.
2021-01-18LibWeb: Stub out the PerformanceTiming object from Navigation TimingAndreas Kling
Just have all the timing functions return 0 for now. We can now run the Shynet JS on https://linus.dev/ although the XHR is rejected by our same-origin policy.
2021-01-18LibWeb: Construct the IDL interface prototype chains automaticallyAndreas Kling
Have each IDL prototype trigger the construction of its own prototype.
2021-01-18LibWeb: Actually instantiate all the web constructors/prototypesAndreas Kling
We now instantiate all the generated web API constructors and expose them on the window object. We also set the generated prototypes on instantiated wrappers. Also, we should obviously find a way to generate this code. :^)