mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Merge github.com:msand/paper.js into msand-master
This commit is contained in:
commit
f224bb3e86
2 changed files with 3 additions and 3 deletions
|
@ -219,7 +219,7 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
||||||
function handleAttribute(name) {
|
function handleAttribute(name) {
|
||||||
name += 'Attribute';
|
name += 'Attribute';
|
||||||
return function(el, attr) {
|
return function(el, attr) {
|
||||||
return el[name](attr) || el[name]('data-paper-' + attr);
|
return el[name] && (el[name](attr) || el[name]('data-paper-' + attr));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,9 +315,9 @@ paper.PaperScope.prototype.PaperScript = (function(root) {
|
||||||
if (src) {
|
if (src) {
|
||||||
// If we're loading from a source, request that first and
|
// If we're loading from a source, request that first and
|
||||||
// then run later.
|
// then run later.
|
||||||
paper.Http.request('get', src, function(code) {
|
paper.Http.request('get', src, function(scope, code) {
|
||||||
evaluate(code, scope);
|
evaluate(code, scope);
|
||||||
});
|
}.bind(this, scope));
|
||||||
} else {
|
} else {
|
||||||
// We can simply get the code form the script tag.
|
// We can simply get the code form the script tag.
|
||||||
evaluate(script.innerHTML, scope);
|
evaluate(script.innerHTML, scope);
|
||||||
|
|
Loading…
Reference in a new issue