GNOME Bugzilla – Bug 702365
gjs: No way to copy Typelib
Last modified: 2018-01-27 11:53:55 UTC
I tried to load type information in gjs, here is my code snippet const Gir = imports.gi.GIRepository; var repo = Gir.Repository.get_default(); repo.require("Gtk", "3.0", 0); gjs reports JS ERROR: !!! Exception was: Error: Can't create a Javascript object for Typelib; no way to copy JS ERROR: !!! message = '"Can't create a Javascript object for Typelib; no way to copy"' JS ERROR: !!! fileName = '"gi-query.js"' JS ERROR: !!! lineNumber = '3' JS ERROR: !!! stack = '"@gi-query.js:3 "' Exception was set even though JS_EvaluateScript() returned true - did you gjs_throw() but not return false somewhere perhaps? I also tried in python, no problem reported >>> from gi.repository import GIRepository >>> repo = GIRepository.Repository.get_default() >>> typelib = repo.require("Gtk", "3.0", 0) >>> typelib.get_namespace() 'Gtk'
*** Bug 729386 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gjs/issues/73.