MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / getFormData

Function getFormData

src/injected/web/requests.js:279–290  ·  view source on GitHub ↗

Chrome/FF can't directly transfer FormData to isolated world so we explode it, * trusting its iterator is usable because the only reason for a site to break it * is to fight a userscript, which it can do by breaking FormData constructor anyway

(data)

Source from the content-addressed store, hash-verified

277 * trusting its iterator is usable because the only reason for a site to break it
278 * is to fight a userscript, which it can do by breaking FormData constructor anyway */
279function getFormData(data) {
280 try {
281 return [[...data::formDataEntries()], 'fd']; // eslint-disable-line no-restricted-syntax
282 } catch (e) {
283 /**/
284 }
285 try {
286 return [data::urlSearchParamsToString(), 'usp'];
287 } catch (e) {
288 /**/
289 }
290}

Callers 1

onRequestCreateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected