WebView::WebView( const std::string& locale, const std::string& timezoneId )
: Control( ControlBehaviour( ACTOR_BEHAVIOUR_DEFAULT | DISABLE_STYLE_CHANGE_SIGNALS ) ),
mUrl(),
- mWebViewSize( Stage::GetCurrent().GetSize() )
+ mVisual(),
+ mWebViewSize( Stage::GetCurrent().GetSize() ),
+ mWebEngine(),
+ mPageLoadStartedSignal(),
+ mPageLoadFinishedSignal()
{
mWebEngine = Dali::WebEngine::New();
if ( mWebEngine )
}
}
-void WebView::AddJavaScriptInterface( const std::string& exposedObjectName, const std::string& jsFunctionName, std::function< std::string(const std::string&) > callback )
+void WebView::AddJavaScriptMessageHandler( const std::string& exposedObjectName, std::function< void( const std::string& ) > handler )
{
if ( mWebEngine )
{
- mWebEngine.AddJavaScriptInterface( exposedObjectName, jsFunctionName, callback );
- }
-}
-
-void WebView::RemoveJavascriptInterface( const std::string& exposedObjectName, const std::string& jsFunctionName )
-{
- if ( mWebEngine )
- {
- mWebEngine.RemoveJavascriptInterface( exposedObjectName, jsFunctionName );
+ mWebEngine.AddJavaScriptMessageHandler( exposedObjectName, handler );
}
}