File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
tools/TypeScript-DOM-lib-generator/src Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -320,12 +320,12 @@ async function emitDom() {
320
320
// outputFolder,
321
321
// useIteratorObject,
322
322
// });
323
- // emitFlavor(webidl, new Set(knownTypes.Worker), {
324
- // name: "sharedworker",
325
- // global: ["SharedWorker", "Worker"],
326
- // outputFolder,
327
- // useIteratorObject,
328
- // });
323
+ emitFlavor ( webidl , new Set ( knownTypes . Worker ) , {
324
+ name : "sharedworker" ,
325
+ global : [ "SharedWorker" , "Worker" ] ,
326
+ outputFolder,
327
+ useIteratorObject,
328
+ } ) ;
329
329
// emitFlavor(webidl, new Set(knownTypes.Worker), {
330
330
// name: "serviceworker",
331
331
// global: ["ServiceWorker", "Worker"],
Original file line number Diff line number Diff line change @@ -1567,7 +1567,7 @@ export async function emitRescriptBindings(webidl: Browser.WebIdl) {
1567
1567
}
1568
1568
printer . endLine ( ) ;
1569
1569
1570
- const windowInterface = allInterfaces . find ( ( i ) => i . name === "Window " ) ;
1570
+ const windowInterface = allInterfaces . find ( ( i ) => i . name === "WindowOrWorkerGlobalScope " ) ;
1571
1571
if ( ! windowInterface ) throw new Error ( "Window interface not found" ) ;
1572
1572
1573
1573
const allProperties : Browser . Property [ ] =
@@ -2823,11 +2823,12 @@ export async function emitRescriptBindings(webidl: Browser.WebIdl) {
2823
2823
interfaceHierarchy = [
2824
2824
{
2825
2825
name : "Temp" ,
2826
- entries : [
2827
- enums ( [ "WebGLPowerPreference" ] ) ,
2828
- dictionaries ( [ "ImageBitmapRenderingContextSettings" , "WebGLContextAttributes" ] ) ,
2826
+ entries : [
2827
+ enums ( [ "WorkerType" ] ) ,
2828
+ individualInterfaces ( [ "SharedWorker" ] ) ,
2829
+ dictionaries ( [ "WorkerOptions" ] )
2829
2830
] ,
2830
- opens : [ ] ,
2831
+ opens : [ "EventAPI" , "ChannelMessagingAPI" ] ,
2831
2832
}
2832
2833
]
2833
2834
@@ -2938,5 +2939,10 @@ export async function emitRescriptBindings(webidl: Browser.WebIdl) {
2938
2939
// emitIndividualInterfaces(remainers);
2939
2940
}
2940
2941
2941
- await emit ( ) ;
2942
+ await emit ( ) ;
2943
+
2944
+ await fs . writeFile (
2945
+ path . join ( outputFolder , "sharedworker.json" ) ,
2946
+ JSON . stringify ( webidl , null , 2 ) ,
2947
+ ) ;
2942
2948
}
You can’t perform that action at this time.
0 commit comments