diff --git a/src/widlprocess.ts b/src/widlprocess.ts index 686e78a7c..bc715a7e7 100644 --- a/src/widlprocess.ts +++ b/src/widlprocess.ts @@ -33,7 +33,7 @@ export function convert(text: string, commentMap: Record) { browser.namespaces!.push(convertNamespace(rootType, commentMap)); } else if (rootType.type === "callback interface") { - browser["callback-interfaces"]!.interface[rootType.name] = convertInterface(rootType, commentMap); + browser["callback-interfaces"]!.interface[rootType.name] = convertCallbackInterface(rootType, commentMap); } else if (rootType.type === "callback") { browser["callback-functions"]!["callback-function"][rootType.name] @@ -92,6 +92,10 @@ function convertInterface(i: webidl2.InterfaceType, commentMap: Record) { + return convertInterfaceCommon(i, commentMap); +} + function convertInterfaceMixin(i: webidl2.InterfaceMixinType, commentMap: Record) { const result = convertInterfaceCommon(i, commentMap); result.mixin = true; @@ -109,7 +113,7 @@ function addComments(obj: any, commentMap: Record, container: st } } -function convertInterfaceCommon(i: webidl2.InterfaceType | webidl2.InterfaceMixinType, commentMap: Record) { +function convertInterfaceCommon(i: webidl2.InterfaceType | webidl2.CallbackInterfaceType | webidl2.InterfaceMixinType, commentMap: Record) { const result: Browser.Interface = { name: i.name, extends: "Object",