I’d like to use GMarkup in gjs, but I can’t create a MarkupParser. If I try to create it with
new MarkupParser() I get this error:
Unable to construct struct type MarkupParser since it has no default constructor and cannot be allocated directly
I can’t just call MarkupParser as a normal function, because then the js interpreter complains that it’s a constructor and can’t be called directly. I can’t create it as a js object literal either, because passing it to
MarkupParseContext.new() gives this error:
TypeError: Object 0x1b9998cbb1c0 is not a subclass of GObject_Boxed, it’s a Object
Is this something that just can’t be done with gjs?