call method

T? call(
  1. String name,
  2. List<String> parameters,
  3. T? target,
  4. T? self,
  5. DOMTreeMap? treeMap,
  6. DOMContext? context,
)

Implementation

T? call(String name, List<String> parameters, T? target, T? self,
    DOMTreeMap? treeMap, DOMContext? context) {
  name = name.trim().toLowerCase();
  if (name.isEmpty) return null;

  switch (name) {
    case 'show':
      return callShow(self);
    case 'hide':
      return callHide(self);
    case 'delete':
    case 'remove':
      return callRemove(self);
    case 'clear':
      return callClear(self);
    case 'addclass':
    case 'addclasses':
      return callAddClass(self, parameters);
    case 'removeclass':
    case 'removeclasses':
      return callAddClass(self, parameters);
    case 'setclass':
    case 'setclasses':
      return callSetClass(self, parameters);
    case 'clearclass':
    case 'clearclasses':
      return callClearClass(self);
    case 'locale':
      return callLocale(self, parameters, context);
    default:
      return null;
  }
}