Skip to content

Commit

Permalink
HTML cell output: respect all atributed of script element
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Oct 30, 2023
1 parent c698e1c commit 42c5258
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/components/CellOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,14 @@ const execute_scripttags = async ({ root_node, script_nodes, previous_results_ma

if (script_el == undefined) {
script_el = document.createElement("script")
script_el.referrerPolicy = node.referrerPolicy
script_el.crossOrigin = node.crossOrigin
script_el.integrity = node.integrity
script_el.noModule = node.noModule
script_el.nonce = node.nonce
script_el.type = node.type
script_el.src = node.src
script_el.type = node.type === "module" ? "module" : "text/javascript"
// Not copying defer or async because this script is not included in the initial HTML document, so it has no effect.
// @ts-ignore
script_el.pluto_is_loading_me = true
}
Expand Down

0 comments on commit 42c5258

Please sign in to comment.