Added ExternalInterface to communicate with HTML.