assaf/zombie — Issue #194: onconfirm throws errors
Author: mren
Created: 2011-10-31 14:58:14+00:00
State: open

zombie throws exceptions when a link with an `onconfirm` attribute is clicked.

for example the website

link

which is accessed in this way

zombie.visit 'http://localhost:8080/test.html', (err, browser) =>
browser.clickLink 'link', (err, browser) =>
...

throws this exceptions

error: Dispatching event 'click' failed. - More:
[object Object]
SyntaxError: Illegal return statement
at Object. (unknown source)
at zombie/node_modules/zombie/node_modules/jsdom/lib/jsdom/level1/core.js:1003:50
at Object. (zombie/node_modules/zombie/node_modules/jsdom/lib/jsdom/level2/events.js:290:17)
at Object.dispatchEvent (zombie/node_modules/zombie/node_modules/jsdom/lib/jsdom/level2/html.js:474:55)
at Browser.fire (zombie/node_modules/zombie/lib/zombie/browser.js:187:14)
at Browser.clickLink (zombie/node_modules/zombie/lib/zombie/browser.js:298:21)
at Object. (zombie/tests/delete.coffee:8:24)
at zombie/tests/delete.coffee:3:63
at zombie/node_modules/zombie/lib/zombie/browser.js:269:20
at Browser. (zombie/node_modules/zombie/lib/zombie/browser.js:160:13)
error: Dispatching event 'click' failed. - More:
[object Object]
SyntaxError: Illegal return statement
at Object. (unknown source)
at zombie/node_modules/zombie/node_modules/jsdom/lib/jsdom/level1/core.js:1003:50
at Object. (zombie/node_modules/zombie/node_modules/jsdom/lib/jsdom/level2/events.js:290:17)
at Object.dispatchEvent (zombie/node_modules/zombie/node_modules/jsdom/lib/jsdom/level2/html.js:474:55)
at Browser.fire (zombie/node_modules/zombie/lib/zombie/browser.js:187:14)
at Browser.clickLink (zombie/node_modules/zombie/lib/zombie/browser.js:298:21)
at Object. (zombie/tests/delete.coffee:8:24)
at zombie/tests/delete.coffee:3:63
at zombie/node_modules/zombie/lib/zombie/browser.js:269:20
at Browser. (zombie/node_modules/zombie/lib/zombie/browser.js:160:13)

and the link is clicked

is this a error on my side or should i write you a vows tests for this error.
if so where should i place the test?