no need for standardMethods anymore

This commit is contained in:
j 2010-12-07 02:08:30 +01:00
parent ba9bf2ee4b
commit 490a80fda7

View File

@ -205,9 +205,6 @@ function getDocsJSON() {
return ret;
function getDoc(key) {
var standardElement = new Ox.Element();
var standardMethods = Ox.filter(Ox.keys(standardElement), function(m) { return typeof standardElement[m] === 'function' });
//FIXME: eventually we want to document all Ox values and functions
if (!/^[A-Z][a-z]/.test(key)) {
return false
@ -219,7 +216,6 @@ function getDocsJSON() {
'functionString': functionString
}
}
var functionString = Ox[key].toString();
try {
var o = new Ox[key]();
} catch(err) {
@ -232,6 +228,7 @@ function getDocsJSON() {
var opts = {};
if ('options' in o && typeof o['options'] == 'function') {
var opts = o.options();
//only inclue methods that are defined in the function
var _methods = Ox.filter(Ox.keys(o), function(m) { return (functionString.indexOf('that.'+m+' =') > -1 && typeof o[m] === 'function')});
$.each(_methods, function(i, m) { methods[m] = o[m].toString() });
}