Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.9

Bring Colours to Your Life.

X3D Reference

Accessing the External Browser

Accessing the External Browser

If you want combine DOM access with X3D access in your JavaScript functions then you probably want to access the external browser object if you want include an external JavaScript file in your HTML page and you don't wanna do it directly a in Script node.

There is the X3D object which is always available, it expects at least one function handler that is called when the browsers (<X3DCanvas> elements) are ready, or the second function handler is called if an error occurred.

The callback function is called when the browser is available. The callback function takes no arguments. The error callback is called if an error occurred, it has one argument error.

The external browser can be accessed by calling the X3D.getBrowser(selector) function, selector can be any CSS selector as used to do from jQuery:

If something went wrong, the error callback is called:

X3D object


The following services can be used to establish a session and obtain the X3DBrowser object.

getBrowser(selector : String)

The selector argument must be a string containing a CSS selector expression to match elements against as you are used to do from jQuery.

getBrowser(element : Object)

Given a DOM element that represents a X3DCanvas element, the getBrowser function returns the appropriate X3DBrowser object.


The X3D object has several properties, you can use any of the properties below.


The X3DConstants object defines values that can be useful for scripting.


All X3DFields (SFBool, SFColor, ..., MFBool, MFColor, and so on). The fields can be created using the object as construtor.

Function Reference

A complete function reference for the X3DBrowser object and all other X3D JavaScript objects can be found here.

Cookies and other Technologies

By clicking »Accept« or continuing to use the site, you agree to the use of CREATE3000 and third-party cookies and other similar technologies to enhance your browsing experience, analyze and measure your engagement with our content, and provide more relevant ads on CREATE3000 websites and others. Learn more about cookies. You can withdraw your consent at any time.