mermaidSetParseErrorHandler function

  1. @JS("mermaidAPI.setParseErrorHandler")
void mermaidSetParseErrorHandler(
  1. void parseError(
    1. String error,
    2. String hash
    )
)

Used to set a handler to be called when invalid diagram syntax is encountered. The definition of the function should match void parseError(String err,String hash). NOTE: As of mermaid version 9.0.1 this method does not exists, but I have submitted a PR that adds this method. The reason for this is that we cannot (from dart interop) add a mermaid.parseError member when none previously existed. (from within javascript this was done simply as mermaid.parseError = function(err,hash) {})

Implementation

@JS("mermaidAPI.setParseErrorHandler")
external void mermaidSetParseErrorHandler(
    void Function(String error, String hash) parseError);