Skip to content

Commit

Permalink
Merge pull request uknownothingsnow#87 from LandChanning/lcn-unregister
Browse files Browse the repository at this point in the history
add  unregister method
  • Loading branch information
uknownothingsnow authored Dec 14, 2017
2 parents 3a4b28f + 2f36763 commit d3d9091
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,17 @@ public void registerHandler(String handlerName, BridgeHandler handler) {
messageHandlers.put(handlerName, handler);
}
}

/**
* unregister handler
*
* @param handlerName
*/
public void unregisterHandler(String handlerName) {
if (handlerName != null) {
messageHandlers.remove(handlerName);
}
}

/**
* call javascript registered handler
Expand Down

0 comments on commit d3d9091

Please sign in to comment.