File tree 1 file changed +10
-4
lines changed
pyscript.core/src/plugins 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,12 @@ async function execute({ currentTarget }) {
91
91
return envs . get ( env ) . then ( ( xworker ) => {
92
92
xworker . onerror = ( { error } ) => {
93
93
if ( hasRunButton ) {
94
- outDiv . innerHTML += `<span style='color:red'>${
95
- error . message || error
96
- } </span>\n`;
94
+ outDiv . insertAdjacentHTML (
95
+ "beforeend" ,
96
+ `<span style='color:red'>${
97
+ error . message || error
98
+ } </span>\n`,
99
+ ) ;
97
100
}
98
101
console . error ( error ) ;
99
102
} ;
@@ -108,7 +111,10 @@ async function execute({ currentTarget }) {
108
111
} ;
109
112
sync . writeErr = ( str ) => {
110
113
if ( hasRunButton ) {
111
- outDiv . innerHTML += `<span style='color:red'>${ str } </span>\n` ;
114
+ outDiv . insertAdjacentHTML (
115
+ "beforeend" ,
116
+ `<span style='color:red'>${ str } </span>\n` ,
117
+ ) ;
112
118
} else {
113
119
notify ( str ) ;
114
120
console . error ( str ) ;
You can’t perform that action at this time.
0 commit comments