plugin Function

Adds new methods, properties and objects to "nano.def", from which the API wrapper is extended. If a function is passed as the second argument it will be executed, with "this" referencing "nano".

Summary

ElementFunction
ReturnsBoolean

Arguments

objObjectObject containing the methods, properties and objects to add.
fnFunctionFunction to execute after extending the API.

Example

nano.plugin({ myPlugin: function() { nano.myPluginObject.myMethod(this.get()); } }, function() { this.myPluginObject = { myMethod: function(text) { alert('Text: ' + text); } }; });