mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05: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
|
@ -15,3 +15,4 @@
|
|||
|
||||
./build.sh
|
||||
cp ../dist/paper.js ../editor/assets/js/paper.js
|
||||
./load.sh
|
||||
|
|
|
@ -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…
Reference in a new issue