-
Notifications
You must be signed in to change notification settings - Fork 520
Headers is not defined #1185
Comments
The headers property is a JavaScript object with name/value pairs. Sent with GitHawk |
You're running within the context of node, not the browser. You can polyfill the You're better off just using a vanilla object though... |
If the goal of Zombie.js is to create a headless browser environment for
then code that relies on browser APIs should be supported, thus Zombie.js should be polyfilling the entire Fetch API. If Zombie.js does not plan to support standardized APIs available in most browsers, then it should consider changing its stated goals or maybe documenting which APIs it does not plan on supporting. |
I'd be more than happy to submit a PR that adds the polyfills. |
I instruct Zombie to visit a page which has the following code:
Then I get an error that
Headers is not defined
, so the script within the simulated headless browser does not continue because it does not recognizeHeaders
. Do I need to add some option to Zombie so it recognizes the entire standard JS Fetch API?The text was updated successfully, but these errors were encountered: