File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Runtime/Scripting/DomProxies Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,14 @@ public void sort()
111
111
public string [ ] keys ( ) => _values . Select ( p => p . Key ) . Distinct ( ) . ToArray ( ) ;
112
112
public string [ ] values ( ) => _values . Select ( p => p . Value ) . ToArray ( ) ;
113
113
public string [ ] [ ] entries ( ) => _values . Select ( p => new [ ] { p . Key , p . Value } ) . ToArray ( ) ;
114
+
115
+ public void forEach ( object callback , object thisArg = null )
116
+ {
117
+ var cb = Callback . From ( callback , null , thisArg ) ;
118
+
119
+ foreach ( var pair in _values ) cb . Call ( pair . Value , pair . Key , this ) ;
120
+ }
121
+
114
122
public IEnumerator < string [ ] > GetEnumerator ( ) => ( ( IEnumerable < string [ ] > ) entries ( ) ) . GetEnumerator ( ) ;
115
123
IEnumerator IEnumerable . GetEnumerator ( ) => entries ( ) . GetEnumerator ( ) ;
116
124
You can’t perform that action at this time.
0 commit comments