require("form-data") returns undefined in Safari in webworker
See original GitHub issueWhen executing the following code:
var FormData = require("form-data");
var formData = new FormData();
I see the following error in the console output:
[Error] TypeError: undefined is not a constructor (evaluating 'new FormData()')
This code works fine in Firefox + Chrome.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
FormData in a webworker - in some browsers - is this wrong?
However, in Safari and Firefox, I get FormData is undefined. I found out that this is fine and to be expected: as mentioned...
Read more >Shiming Request.formData in Safari - Paul Kinlan
When reading the request data that is posted by the user from a Form, you can use the event.request.formData() method to get a...
Read more >Safari Technology Preview Release Notes
formData () to not reject the promise if the body is null and the MIME type ... or port if its host is...
Read more >Web Workers API - Web APIs - MDN Web Docs - Mozilla
Web Workers makes it possible to run a script operation in a background thread separate from the main execution thread of a web...
Read more >Web worker - Wikipedia
A web worker, as defined by the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG), is a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just had the problem with the request module (browserifyed version) 😉 They use methods which doessn’t exist in the browser. But that another issue 😃
That’s the goal, since node-form-data only works in nodejs. And browser has built-in functionality.