[webkit-gtk] webkit_dom_document_get_active_element is depreciated

lmoura lmoura at igalia.com
Sat Jan 8 21:48:03 PST 2022

On 2022-01-07 11:59, René wrote:
> Hi,
> I'm pretty happy to use the fn in the subject although it's
> depreciated. Do you have any sample how to use the JavaScriptCore?
> Let's say, I've got the ptr to the JSCContext. Now what?! How do I get
> the `document.activeElement`?? Pls note I don't need the whole
> solution - just the fn names and / or code snaps I need to take a look
> at. Ta

I never used this API directly but you can check the API tests code. For
example, the snippet below invokes `getElementByID` on `document`through


GRefPtr<JSCValue> jsDocument =
GRefPtr<JSCValue> jsInputElement =
"getElementById", G_TYPE_STRING, elementID, G_TYPE_NONE));
To get `activeElement`, maybe you could use
`jsc_value_object_get_property` instead of `invoke_method`.


> Rene
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk

More information about the webkit-gtk mailing list