It seems the wording of the documentation has been copied from the documentation for QWebFrame::addToJavaScriptWindowObject in Qt 4.6:
http://doc.qt.nokia.com/4.6/qwebframe.html#addToJavaScriptWindowObject Is the reason for the confusing documentation? Cheers, Jack On Thu, May 6, 2010 at 2:37 PM, Jack Wootton <[email protected]> wrote: > Hello, > > I hope someone can provide clarification on the documentation for QML > WebView. > > Reading the documentation for Qt 4.7 QML WebView, specifically the property > javaScriptWindowObjects: > > > http://doc.qt.nokia.com/4.7-snapshot/qml-webview.html#javaScriptWindowObjects-prop > > Firstly the documentation states: "This property is a list of object that > are available from within the webview's JavaScript context.". So this > returns a list of all objects available in the JavaScript context for the > document the WebView is currently displaying? I expect this would include > objects such as "document" and "window"? > > Secondly the documentation states: "The *object* will be inserted as a > child of the frame's window object, under the name given by the attached > property WebView.windowObjectName.". This seems at odss with a read-only > property? It seems to suggest that C++ objects can be made available in the > JavaScipt context of the document currently being displayed in the WebView? > > Thirdly the documentation states: "Properties of the object will be exposed > as JavaScript properties and slots as JavaScript methods.". Again, I do not > understand how C++ objects can be made inserted into a JavaScript context > using a read-only property of WebView. > > Lastly, an example is given: > > WebView { > > > javaScriptWindowObjects: Object { > WebView.windowObjectName: "coordinates" > } > } > > > In this example, what is "Object"? A C++ object? A JavaScript object? > > -- > Regards > Jack > -- Regards Jack
_______________________________________________ Qt4-preview-feedback mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
