In TestObj.idl: static void classMethod(); static long classMethodWithOptional(in [Optional] long arg); Leads to generated code: WebKitDOMTestObj.h: WEBKIT_API void webkit_dom_test_obj_class_method(WebKitDOMTestObj* self); WEBKIT_API glong webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg); WebKitDOMTestObj.cpp: void webkit_dom_test_obj_class_method(WebKitDOMTestObj* self) { g_return_if_fail(self); WebCore::JSMainThreadNullState state; WebCore::TestObj * item = WebKit::core(self); item->classMethod(); } glong webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg) { g_return_val_if_fail(self, 0); WebCore::JSMainThreadNullState state; WebCore::TestObj * item = WebKit::core(self); glong res = item->classMethodWithOptional(arg); return res; }