@steve02081504/virtual-console 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.mjs +5 -5
- package/package.json +1 -1
package/browser.mjs
CHANGED
|
@@ -138,12 +138,12 @@ export class VirtualConsole {
|
|
|
138
138
|
if (this.options.recordOutput) {
|
|
139
139
|
this.outputs += formatArgs(args) + '\n'
|
|
140
140
|
this.outputsHtml += argsToHtml(args) + '<br/>\n'
|
|
141
|
-
}
|
|
142
141
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
if (method == 'trace') {
|
|
143
|
+
const stack = new Error().stack || '\nNot available'
|
|
144
|
+
this.outputs += stack.slice(stack.indexOf('\n') + 1) + '\n'
|
|
145
|
+
this.outputsHtml += escapeHtml(stack.slice(stack.indexOf('\n') + 1)) + '<br/>\n'
|
|
146
|
+
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
// 实际输出
|