@@ -428,9 +428,20 @@ module Data =
428
428
| name when Seq.contains name iNames -> name
429
429
| _ -> raise ( Exception( " Element conflict occured! Typename: " + tagName))
430
430
431
- [ for i in GetNonCallbackInterfacesByFlavor Flavor.All do
432
- yield ! [ for e in i.Elements do
433
- yield ( e.Name, i.Name) ] ]
431
+ let nativeTagNamesToInterface =
432
+ [ for i in GetNonCallbackInterfacesByFlavor Flavor.All do
433
+ yield ! [ for e in i.Elements do
434
+ yield ( e.Name, i.Name) ] ]
435
+
436
+ let addedTagNamesToInterface =
437
+ [ for i in InputJson.getAddedItems InputJson.ItemKind.Interface Flavor.All
438
+ |> Array.filter ( fun i -> Seq.length i.TagNames > 0 ) do
439
+ yield ! [ for e in i.TagNames do
440
+ match i.Name with
441
+ | Some name -> yield ( e, name)
442
+ | _ -> () ] ]
443
+
444
+ nativeTagNamesToInterface @ addedTagNamesToInterface
434
445
|> Seq.groupBy fst
435
446
|> Seq.map (( fun ( key , group ) -> ( key, Seq.map snd group)) >> fun ( key , group ) ->
436
447
key,
@@ -448,15 +459,33 @@ module Data =
448
459
match i.Extends with
449
460
| " Object" -> []
450
461
| super -> super :: ( getExtendList super)
451
- | _ -> []
462
+ | _ ->
463
+ match InputJson.getAddedItemByName iName InputJson.ItemKind.Interface iName with
464
+ | Some i ->
465
+ match i.Extends with
466
+ | Some extends ->
467
+ match extends with
468
+ | " Object" -> []
469
+ | super -> super :: ( getExtendList super)
470
+ | _ -> []
471
+ | _ -> []
452
472
453
473
let getImplementList ( iName : string ) =
454
474
match GetInterfaceByName iName with
455
475
| Some i -> List.ofArray i.Implements
456
476
| _ -> []
457
-
458
- Array.concat [| allWebNonCallbackInterfaces; worker.Interfaces; worker.MixinInterfaces.Interfaces |]
459
- |> Array.map ( fun i -> ( i.Name, List.concat [ ( getExtendList i.Name); ( getImplementList i.Name) ]))
477
+
478
+ let addedINameToIDependList =
479
+ InputJson.getAddedItems InputJson.ItemKind.Interface Flavor.All
480
+ |> Array.ofSeq
481
+ |> Array.filter ( fun i -> i.Name.IsSome)
482
+ |> Array.map ( fun i -> ( Option.get i.Name, List.concat [ ( getExtendList ( Option.get i.Name)); ( getImplementList ( Option.get i.Name)) ]))
483
+
484
+ let nativeINameToIDependList =
485
+ Array.concat [| allWebNonCallbackInterfaces; worker.Interfaces; worker.MixinInterfaces.Interfaces |]
486
+ |> Array.map ( fun i -> ( i.Name, List.concat [ ( getExtendList i.Name); ( getImplementList i.Name) ]))
487
+
488
+ Array.concat [| addedINameToIDependList; nativeINameToIDependList |]
460
489
|> Map.ofArray
461
490
462
491
/// Distinct event type list, used in the "createEvent" function
0 commit comments