mirror of
https://github.com/less/less.js.git
synced 2026-02-15 01:15:02 -05:00
- Limited @import (plugin) support to add/addMultiple of functions - Altered @import (plugin) loading to support browser - Support proper closure scoping of @import (plugin) loaded functions
17 lines
482 B
JavaScript
17 lines
482 B
JavaScript
var functionCaller = function(name, context, index, currentFileInfo) {
|
|
this.name = name.toLowerCase();
|
|
this.index = index;
|
|
this.context = context;
|
|
this.currentFileInfo = currentFileInfo;
|
|
|
|
this.func = context.frames[0].functionRegistry.get(this.name);
|
|
};
|
|
functionCaller.prototype.isValid = function() {
|
|
return Boolean(this.func);
|
|
};
|
|
functionCaller.prototype.call = function(args) {
|
|
return this.func.apply(this, args);
|
|
};
|
|
|
|
module.exports = functionCaller;
|