Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Conversation

eomuraliev
Copy link

The Function.prototype.bind polyfill used does not work with Phantomjs. Get the following error locally:

ERROR: TypeError: instanceof called on an object with an invalid prototype property.
TRACE:
...../jasmine/assets/jasmine-console-shims.js: 19

People had the same issue here: facebook/react#945
React's polyfill for Function.prototype.bind addresses the issue.

This pull request is for replacing the existing polyfill, which looks it was copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Compatibility
with the one from React.js located at https://github.com/facebook/react/blob/master/src/test/phantomjs-shims.js

Alternatively, I could just fix the existing polyfill instead of replacing it, to make the diff smaller. Let me know what is preferable.

@searls
Copy link
Member

searls commented Jun 27, 2014

Seems like a good idea. I hope to get a chance to review it soon

On Tue, Jun 24, 2014 at 2:47 PM, eomuraliev notifications@github.com
wrote:

The Function.prototype.bind polyfill used does not work with Phantomjs. Get the following error locally:

ERROR: TypeError: instanceof called on an object with an invalid prototype property.
TRACE:
...../jasmine/assets/jasmine-console-shims.js: 19

People had the same issue here: facebook/react#945
React's polyfill for Function.prototype.bind addresses the issue.
This pull request is for replacing the existing polyfill, which looks it was copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
with the one from react located at https://github.com/facebook/react/blob/master/src/test/phantomjs-shims.js
Alternatively, I could just fix the existing polyfill instead of replacing it, to make the diff smaller.
You can merge this Pull Request by running:
git pull https://github.com/eomuraliev/jasmine-rails replace_function_bind_polyfill_for_phantomjs
Or you can view, comment on it, or merge it online at:
#137
-- Commit Summary --

searls added a commit that referenced this pull request Jul 2, 2014
…l_for_phantomjs

Replace Function.prototype.bind polyfill with one that works for the latest version of Phantomjs
@searls searls merged commit 578bb4e into testdouble:master Jul 2, 2014
@searls
Copy link
Member

searls commented Jul 2, 2014

landed in 0.9.1

On Tue, Jun 24, 2014 at 2:47 PM, eomuraliev notifications@github.com
wrote:

The Function.prototype.bind polyfill used does not work with Phantomjs.
Get the following error locally:

ERROR: TypeError: instanceof called on an object with an invalid prototype property.
TRACE:
...../jasmine/assets/jasmine-console-shims.js: 19

People had the same issue here: facebook/react#945
facebook/react#945
React's polyfill for Function.prototype.bind addresses the issue.

This pull request is for replacing the existing polyfill, which looks it
was copied from
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
with the one from react located at
https://github.com/facebook/react/blob/master/src/test/phantomjs-shims.js

Alternatively, I could just fix the existing polyfill instead of replacing

it, to make the diff smaller.

You can merge this Pull Request by running

git pull https://github.com/eomuraliev/jasmine-rails replace_function_bind_polyfill_for_phantomjs

Or view, comment on, or merge it at:

#137
Commit Summary

  • Replace Function.prototype.bind polyfill with one that works for the
    latest version of Phantomjs

File Changes

Patch Links:

Reply to this email directly or view it on GitHub
#137.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants