You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I understand of the code, it's not possible to pass functions as parameters into evalSync for the client... because the parameters eventually get stringified by phantom and that means only valid JSON types can be passed.
Obviously this isn't going to work, because "helpers" isn't defined after the evalSync function is injected. I don't want to put the emit in the helpers.initialise function because I'm trying to keep my library code free from the concept of Laika.
I tried some closure tricks, but I always ended up clobbering the scope for either 'helpers.initialise' or the 'emit'.
Hoping for some input on this one.
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Possible to pass object into client evalSync?
Possible to pass complex object into client evalSync?
May 29, 2014
ghost
changed the title
Possible to pass complex object into client evalSync?
Possible to pass function into client evalSync?
May 29, 2014
From what I understand of the code, it's not possible to pass functions as parameters into evalSync for the client... because the parameters eventually get stringified by phantom and that means only valid JSON types can be passed.
I'm trying to achieve something like this...
Obviously this isn't going to work, because "helpers" isn't defined after the evalSync function is injected. I don't want to put the emit in the helpers.initialise function because I'm trying to keep my library code free from the concept of Laika.
I tried some closure tricks, but I always ended up clobbering the scope for either 'helpers.initialise' or the 'emit'.
Hoping for some input on this one.
The text was updated successfully, but these errors were encountered: