File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -249,9 +249,13 @@ Numbas.getStandaloneFileURL = function(extension, path) {
249249 *
250250 * @param {string } extension - The name of the extension.
251251 * @param {string } path - The path to the script, relative to the extension's `standalone_scripts` folder.
252+ * @param {string } [type] - The type of the script, such as `"module"`.
252253 */
253- Numbas . loadStandaloneScript = function ( extension , path ) {
254+ Numbas . loadStandaloneScript = function ( extension , path , type ) {
254255 var script = document . createElement ( 'script' ) ;
256+ if ( type ) {
257+ script . setAttribute ( 'type' , type ) ;
258+ }
255259 script . setAttribute ( 'src' , Numbas . getStandaloneFileURL ( extension , path ) ) ;
256260 document . head . appendChild ( script ) ;
257261}
You can’t perform that action at this time.
0 commit comments