refactor inheritance in mixin.js
This commit is contained in:
parent
94dfd6fac7
commit
e73176e532
@ -54,9 +54,11 @@ tree.mixin.Definition = function (name, params, rules) {
|
|||||||
};
|
};
|
||||||
tree.mixin.Definition.prototype = {
|
tree.mixin.Definition.prototype = {
|
||||||
toCSS: function () { return "" },
|
toCSS: function () { return "" },
|
||||||
variable: function (name) { return tree.Ruleset.prototype.variable.call(this, name) },
|
|
||||||
find: function () { return tree.Ruleset.prototype.find.apply(this, arguments) },
|
parent: tree.Ruleset.prototype,
|
||||||
rulesets: function () { return tree.Ruleset.prototype.rulesets.apply(this) },
|
variable: function (name) { return this.parent.variable.call(this, name) },
|
||||||
|
find: function () { return this.parent.find.apply(this, arguments) },
|
||||||
|
rulesets: function () { return this.parent.rulesets.apply(this) },
|
||||||
|
|
||||||
eval: function (args, env) {
|
eval: function (args, env) {
|
||||||
var frame = new(tree.Ruleset)(null, []), context;
|
var frame = new(tree.Ruleset)(null, []), context;
|
||||||
|
Loading…
Reference in New Issue
Block a user