Skip to content

Commit efb9e29

Browse files
authored
Update networkTypes.js
1 parent b731bb4 commit efb9e29

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

javascript/selenium-webdriver/bidi/networkTypes.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,17 @@ class Header {
119119
get value() {
120120
return this._value
121121
}
122+
123+
/**
124+
* Converts the Header to a map.
125+
* @returns {Map<string, any>} A map representation of the Header.
126+
*/
127+
asMap() {
128+
return new Map([
129+
["name", this.name],
130+
["value", Object.fromEntries(this.value.asMap())]
131+
]);
132+
};
122133
}
123134

124135
/**

0 commit comments

Comments
 (0)