In PHP you can detect when a method is called even when it doesn\'t exist using the \"magic\" __call function.
public function __call($methodNam
Although it's not an elegant way as we've already deduced that JavaScript does not have a __call, method_missing, __getattr__ it is possible to create combinations of properties to create concrete functions that relay to a single method, passing along the properties that were used to create it.
One example is Myriad.js.