mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 06:10:14 -04:00
Improve Paper code editor to also display errors.
This commit is contained in:
parent
7096b37b2e
commit
4a74cf9e29
2 changed files with 3 additions and 2 deletions
src/core
|
@ -222,7 +222,7 @@ var PaperScript = this.PaperScript = new function() {
|
|||
// Only load this script if it not loaded already.
|
||||
// Support both text/paperscript and text/x-paperscript:
|
||||
if (/^text\/(?:x-|)paperscript$/.test(script.type)
|
||||
&& !script.getAttribute('data-paper-loaded')) {
|
||||
&& !script.getAttribute('data-paper-ignore')) {
|
||||
// Produce a new PaperScope for this script now. Scopes are
|
||||
// cheap so let's not worry about the initial one that was
|
||||
// already created.
|
||||
|
@ -241,7 +241,7 @@ var PaperScript = this.PaperScript = new function() {
|
|||
evaluate(script.innerHTML, scope);
|
||||
}
|
||||
// Mark script as loaded now.
|
||||
script.setAttribute('data-paper-loaded', true);
|
||||
script.setAttribute('data-paper-ignore', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue