73#include <Ultralight/CAPI/CAPI_DOMDocument.h>
74#include <Ultralight/CAPI/CAPI_DOMElement.h>
169 ULDOMElement element = ulDOMElementFromJSValue(borrowed);
177 return ulCreateJSValueNull(ctx);
178 return ulDOMElementGetJSValue(value.
raw(), ctx);
180 static constexpr const char*
SchemaType() {
return "Element"; }
struct C_JSContext * ULJSContext
Opaque handle to a JavaScript execution context (one page's script world in one View).
Definition View.h:25
The root of a page's DOM tree in a View or frame.
Definition Document.h:106
ULDOMDocument raw() const
Get the C handle, for passing to the <Ultralight/CAPI/CAPI_DOMDocument.h> functions.
Definition Document.h:959
A handle to an element on a page.
Definition Element.h:142
static Element Adopt(ULDOMElement handle)
Wrap a C handle you own, taking ownership of it.
Definition Element.h:1987
ULDOMElement raw() const
Get the C handle, for passing to the <Ultralight/CAPI/CAPI_DOMElement.h> functions.
Definition Element.h:2006
bool IsEmpty() const
Whether or not this Node is empty (it holds no handle).
Definition Node.h:216
JavaScript execution environment for a page.
Definition Context.h:151
ULJSContext raw() const
Get the C API handle without transferring ownership.
Definition Context.h:615
static Context Adopt(ULJSContext handle)
Take ownership of a context handle from the C API.
Definition Context.h:190
A handle to a live JavaScript value.
Definition Value.h:210
static Value Adopt(ULJSValue handle)
Take ownership of a handle from the C API without adding a reference.
Definition Value.h:799
ULJSValue raw() const
Get the C API handle without transferring ownership.
Definition Value.h:820
Direct C++ access to modify page elements and handle events.
Element FromJS(const js::Value &value)
Get the element a JavaScript value refers to (the inverse of ToJS()).
Definition JSInterop.h:118
js::Context GetJSContext(const Document &document)
Get the JavaScript context of a document (the context its page's scripts run in).
Definition JSInterop.h:135
js::Value ToJS(const js::Context &context, const Element &element)
Get an element's JavaScript object (the same object the page's scripts see for it).
Definition JSInterop.h:97
Type-checked JavaScript bridge between C++ and web pages.
Definition JSInterop.h:141
Root namespace for every public Ultralight type, function, and enumeration.
static bool FromJS(ULJSContext, ULJSValue borrowed, dom::Element *out, ULJSValue *)
Definition JSInterop.h:168
static ULJSValue ToJS(ULJSContext ctx, const dom::Element &value)
Definition JSInterop.h:175
static constexpr const char * SchemaType()
Definition JSInterop.h:180
Type conversions between C++ and JavaScript across the bridge.
Definition TypeTraits.h:240