mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-11 16:18:11 +00:00
document #259
This commit is contained in:
parent
9b2c5d5932
commit
9d4d294bad
@ -1,5 +1,42 @@
|
||||
# The jsPsych core library
|
||||
|
||||
---
|
||||
## jsPsych.addNodeToEndOfTimeline
|
||||
```
|
||||
jsPsych.addNodeToEndOfTimeline(node_parameters)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Parameter | Type | Description
|
||||
--------- | ---- | -----------
|
||||
node_parameters | object | An object defining a timeline. It must have, at a minimum, a `timeline` parameter with a valid timeline array as the value for that parameter.
|
||||
|
||||
### Return value
|
||||
|
||||
None.
|
||||
|
||||
### Description
|
||||
|
||||
Adds the timeline to the end of the experiment.
|
||||
|
||||
### Example
|
||||
|
||||
#### End the experiment if a particular response is given
|
||||
|
||||
```javascript
|
||||
var trial = {
|
||||
type: 'text',
|
||||
text: 'This is a new trial.'
|
||||
}
|
||||
|
||||
var new_timeline = {
|
||||
timeline: [trial]
|
||||
}
|
||||
|
||||
jsPsych.addNodeToEndOfTimeline(new_timeline)
|
||||
```
|
||||
|
||||
---
|
||||
## jsPsych.currentTimelineNodeID
|
||||
|
||||
|
@ -6,6 +6,7 @@ Every jsPsych experiment utilizes the core library (contained in the `jspsych.js
|
||||
|
||||
### [Core](jspsych-core.md)
|
||||
|
||||
* [jsPsych.addNodeToEndOfTimeline](jspsych-core.md#jspsychaddnodetoendoftimeline)
|
||||
* [jsPsych.currentTimelineNodeID](jspsych-core.md#jspsychcurrenttimelinenodeid)
|
||||
* [jsPsych.currentTrial](jspsych-core.md#jspsychcurrenttrial)
|
||||
* [jsPsych.endCurrentTimeline](jspsych-core.md#jspsychendcurrenttimeline)
|
||||
|
Loading…
Reference in New Issue
Block a user