MBS Plugin Documentation

Search:

Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchie

New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0

The list of the   themes,   classes,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

class WebScriptObjectMBS
class, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The base object for scripting and all DOM objects.
Notes: All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the message, name and reason properties you can see what was the reason for this exception. Please report if you find a method which does not handle exceptions correct.
WebScriptObjectMBS.evaluateWebScript(script as String) as variant
method, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Evaluates a script.
Example:
dim code as string

// code="1+5"
code="""hello ""+5"

MsgBox HTMLViewer1.mainFrameMBS.DOMDocument.evaluateWebScript(code)
// shows result of calculations

Notes:
The script will be executed in the target script environment. The format of the script is dependent of the target script environment.

Name: The script to execute in the target script environment.
WebScriptObjectMBS.getValue(name as String) as variant
method, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Gets a value in this webscript object.
Example:
MsgBox HTMLViewer1.mainFrameMBS.DOMDocument.getValue("key")

Notes: Works for numbers, booleans, dates and strings.
WebScriptObjectMBS.Handle as Integer
property, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The handle of the internal used reference to a WebScriptObject.
Notes: (Read and Write property)
WebScriptObjectMBS.removeValue(name as String)
method, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Removes a value with the given name.
WebScriptObjectMBS.setValue(name as String, value as variant)
method, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Sets a value in this webscript object.
Example:
HTMLViewer1.mainFrameMBS.DOMDocument.setValue("key","Hello")

Notes: Works for numbers, booleans, dates and strings.
WebScriptObjectMBS.setWebScriptCallback(name as String, value as WebScriptCallbackMBS)
method, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Sets a value in this webscript object.
Example:
// in the windowScriptObjectAvailable event you can register the callback object

Function windowScriptObjectAvailable(windowScriptObject as WebScriptObjectMBS) As boolean
// Install an Object called "MyBrowser" on the javascript document object
// Any function call inside will tricker callback event
windowScriptObject.setWebScriptCallback "MyBrowser", app.callback

End Function

Notes: This is the special version of SetValue to be used with the WebScriptCallbackMBS class.
WebScriptObjectMBS.setWebScriptValueAtIndex(index as integer, value as variant)
method, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Sets the value of the property at the specified index.
Notes:
Index is zero based.
Works for numbers, booleans, dates and strings.
WebScriptObjectMBS.stringRepresentation as String
method, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The string representation of this object.
Notes: Returns an empty string on any error.
WebScriptObjectMBS.webScriptValueAtIndex(index as integer) as variant
method, HTMLViewer, MBS Cocoa Plugin (WebScriptObject), class WebScriptObjectMBS, Console safe, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Gets the value of the property at the specified index.
Example:
MsgBox HTMLViewer1.mainFrameMBS.DOMDocument.webScriptValueAtIndex(1)

Notes:
Index is zero based.
Works for numbers, booleans, dates and strings.

The items on this page are in the following plugins: MBS Cocoa Plugin.