bindExternalFunction method

void bindExternalFunction(
  1. String id,
  2. Function function, {
  3. bool override = false,
})

Register a external function into scrfipt there must be a declaraction also in script for using this

Implementation

void bindExternalFunction(String id, Function function,
    {bool override = false}) {
  if (externFunctions.containsKey(id) && !override) {
    throw HTError.defined(id, ErrorType.runtimeError);
  }
  externFunctions[id] = function;
}