hound
hound copied to clipboard
How to sideload PhantomJS Polyfills?
I get:
TypeError: undefined is not a constructor (evaluating 'Object.assign({}, state, {
isFetching: true
})')
from PhantomJS because Object.assign()
seems to be missing. I would like to polyfill it, for example with phantomjs-polyfill-object-assign
.
As declared in the Readme of the mentioned project, in Karma you are able to sideload javascript files into Phantom/the page. How would one go about that with hound?
I know polyfilling Object.assign
isn't that much code so I could probably do it in the project itself but I would rather not do it if it isn't necessary.
IIRC, PhantomJS 2 should support Object.assign
correctly.
Otherwise, I suggest you just add the polyfill to your project, as I do not think this is really the job of Hound, which is an interface to an external webdriver.
@HashNuke What do you think?
I use PhantomJS 2 it neither supports Object.assign
nor Promises.
I think it's a valid feature for hound to support polyfilling the web driver environment for cases were PhantomJS lags behind the minimum browser versions you would like to support. How is hound different then Karma in that perspective?
Looks like with Chrome and Firefox working on headless modes, PhantomJs is going to be discontinued. Is this issue still relevant?