Browse Source

webidl: wasmjob: write forward interface definitions

mattias 3 years ago
parent
commit
6bc34710c8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/webidl/src/webidltowasmjob.pp

+ 4 - 0
packages/webidl/src/webidltowasmjob.pp

@@ -399,7 +399,11 @@ begin
   if D is TIDLDictionaryDefinition then
     AddLn(GetName(D)+' = '+JOB_JSValueTypeNames[jjvkDictionary]+';')
   else
+    begin
+    if (not D.IsPartial) and (D is TIDLInterfaceDefinition) then
+      AddLn(GetPasIntfName(D)+' = Interface;');
     Result:=inherited WriteForwardClassDef(D);
+    end;
 end;
 
 function TWebIDLToPasWasmJob.WriteFunctionDefinition(