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 10801080 }
10811081 }
10821082 },
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- },
10941083 "IDBObjectStore" : {
10951084 "methods" : {
10961085 "method" : {
Original file line number Diff line number Diff line change @@ -827,6 +827,21 @@ export function emitWebIdl(
827827 ) ;
828828 }
829829
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+
830845 function emitProperty (
831846 prefix : string ,
832847 i : Browser . Interface ,
@@ -871,8 +886,10 @@ export function emitWebIdl(
871886 if ( ! prefix && canPutForward && p . putForwards ) {
872887 printer . printLine ( `get ${ p . name } ${ optionalModifier } (): ${ pType } ;` ) ;
873888
874- const forwardingProperty =
875- allInterfacesMap [ pType ] . properties ?. property [ p . putForwards ] ;
889+ const forwardingProperty = getPropertyFromInterface (
890+ allInterfacesMap [ pType ] ,
891+ p . putForwards ,
892+ ) ;
876893 if ( ! forwardingProperty ) {
877894 throw new Error ( "Couldn't find [PutForwards]" ) ;
878895 }
You can’t perform that action at this time.
0 commit comments