Skip to content

Instantly share code, notes, and snippets.

@diorahman
Created February 27, 2012 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diorahman/1927963 to your computer and use it in GitHub Desktop.
Save diorahman/1927963 to your computer and use it in GitHub Desktop.
Silence
import QtQuick 1.1
import QtWebKit 1.0
import com.nokia.meego 1.0
Page {
id: root
tools: commonTools
WebView {
javaScriptWindowObjects: QtObject {
WebView.windowObjectName: "qml"
function qmlCall() {
console.log("This call is in QML!");
}
}
html: "<script>console.log(\"This is in WebKit!\"); window.qml.qmlCall(); alert('yeah')</script>"
}
}
@diorahman
Copy link
Author

The output is only "This call is in QML!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment