-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsPsych as global variable #528
Conversation
Visit the preview URL for this PR (updated for commit 99556aa): https://ccv-honeycomb--pr528-jspsych-global-0rome70j.web.app (expires Wed, 21 Aug 2024 22:05:08 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 4ace1dcea913a952d2a1af84b94a4421bf36e610 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you've created a getJsPsych
utility function, but are using window.jsPsych
in all of the refactored lines.
What reasoning is behind this? From my perspective it seems like you should use the utility function throughout.
I think when I talked with Rob about this, he noted that maybe first we use the I do agree maybe accessing through the utility function throughout Honeycomb may be more consistent and flexible to modifications. The only thing I am unsure about is if it's necessary since accessing this object is only a oneliner. Please let me know if you have any further thoughts on this! I'm leaning towards refactoring to access through util function throughout. |
Let's use the utility function that we'd be directing folks to use. It might unclear to folks if they see So take out the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment to the other thread. Basically, let's use the utility function throughout instead of window.jsPsych
!
Thanks for the great work Megan !
Just refactored this in the new commit! |
ref: change all func taking in jspsych to const syntax / trials to co…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work Megan !
jsPsych
instance gets initialized, set global variablewindow.jsPsych
to this objectjsPsych
objectjsPsych
intowindow.jsPsych
to be accessed globallyjsPsych
instance