File tree Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 1080
1080
}
1081
1081
}
1082
1082
},
1083
- "Notification" : {
1084
- "properties" : {
1085
- "property" : {
1086
- "maxActions" : {
1087
- // BCD incorrectly indicates Firefox support
1088
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1225110#c31
1089
- "exposed" : " "
1090
- }
1091
- }
1092
- }
1093
- },
1094
1083
"IDBObjectStore" : {
1095
1084
"methods" : {
1096
1085
"method" : {
Original file line number Diff line number Diff line change @@ -827,6 +827,21 @@ export function emitWebIdl(
827
827
) ;
828
828
}
829
829
830
+ function getPropertyFromInterface (
831
+ i : Browser . Interface ,
832
+ propertyName : string ,
833
+ ) {
834
+ let property ;
835
+ let currentInterface : Browser . Interface | undefined = i ;
836
+ while ( ! property && currentInterface ) {
837
+ property = currentInterface . properties ?. property [ propertyName ] ;
838
+ currentInterface = currentInterface . extends
839
+ ? allInterfacesMap [ currentInterface . extends ]
840
+ : undefined ;
841
+ }
842
+ return property ;
843
+ }
844
+
830
845
function emitProperty (
831
846
prefix : string ,
832
847
i : Browser . Interface ,
@@ -871,8 +886,10 @@ export function emitWebIdl(
871
886
if ( ! prefix && canPutForward && p . putForwards ) {
872
887
printer . printLine ( `get ${ p . name } ${ optionalModifier } (): ${ pType } ;` ) ;
873
888
874
- const forwardingProperty =
875
- allInterfacesMap [ pType ] . properties ?. property [ p . putForwards ] ;
889
+ const forwardingProperty = getPropertyFromInterface (
890
+ allInterfacesMap [ pType ] ,
891
+ p . putForwards ,
892
+ ) ;
876
893
if ( ! forwardingProperty ) {
877
894
throw new Error ( "Couldn't find [PutForwards]" ) ;
878
895
}
You can’t perform that action at this time.
0 commit comments