}
}
-void WebEngine::AddJavaScriptInterface( const std::string& exposedObjectName, const std::string& jsFunctionName, std::function< std::string(const std::string&) > cb )
+void WebEngine::AddJavaScriptMessageHandler( const std::string& exposedObjectName, std::function< void(const std::string&) > handler )
{
if( mPlugin != NULL )
{
- mPlugin->AddJavaScriptInterface( exposedObjectName, jsFunctionName, cb );
- }
-}
-
-void WebEngine::RemoveJavascriptInterface( const std::string& exposedObjectName, const std::string& jsFunctionName )
-{
- if( mPlugin != NULL )
- {
- mPlugin->RemoveJavascriptInterface( exposedObjectName, jsFunctionName );
+ mPlugin->AddJavaScriptMessageHandler( exposedObjectName, handler );
}
}