initializeMethods method

  1. @override
void initializeMethods(
  1. Map<String, BindingObjectMethod> methods
)
override

Implementation

@override
void initializeMethods(Map<String, BindingObjectMethod> methods) {
  methods['getBoundingClientRect'] = BindingObjectMethodSync(call: (_) => getBoundingClientRect());
  methods['getClientRects'] = BindingObjectMethodSync(call: (_) => getClientRects());
  methods['scroll'] =
      BindingObjectMethodSync(call: (args) => scroll(castToType<double>(args[0]), castToType<double>(args[1])));
  methods['scrollBy'] =
      BindingObjectMethodSync(call: (args) => scrollBy(castToType<double>(args[0]), castToType<double>(args[1])));
  methods['scrollTo'] =
      BindingObjectMethodSync(call: (args) => scrollTo(castToType<double>(args[0]), castToType<double>(args[1])));
  methods['click'] = BindingObjectMethodSync(call: (_) => click());
  methods['getElementsByClassName'] = BindingObjectMethodSync(call: (args) => getElementsByClassName(args));
  methods['getElementsByTagName'] = BindingObjectMethodSync(call: (args) => getElementsByTagName(args));
  methods['querySelectorAll'] = BindingObjectMethodSync(call: (args) => querySelectorAll(args));
  methods['querySelector'] = BindingObjectMethodSync(call: (args) => querySelector(args));
  methods['matches'] = BindingObjectMethodSync(call: (args) => matches(args));
  methods['closest'] = BindingObjectMethodSync(call: (args) => closest(args));
}