UNPKG

@jspsych/new-extension

Version:

CLI tool to create new jsPsych extensions

30 lines (26 loc) 790 B
<!DOCTYPE html> <html> <head> <title>{globalName} Example</title> <script src="https://unpkg.com/jspsych"></script> {publishingComment} <!-- Example plugin an extension may work with --> <script src="https://unpkg.com/@jspsych/plugin-html-keyboard-response@1.1.3"></script> <script src="../dist/index.browser.min.js"></script> <link href="https://unpkg.com/jspsych@7.3.4/css/jspsych.css" rel="stylesheet" /> </head> <body> <script> const jsPsych = initJsPsych({ extensions: [{ type: {globalName} }], }); const trial = { type: jsPsychHtmlKeyboardResponse, stimulus: "Hello world", extensions: [{ type: {globalName} }, ], }; jsPsych.run([trial]); </script> </body> </html>