Class: UWA.Controls.Web

UWA/Controls/Web. UWA.Controls.Web

new UWA.Controls.Web(options)

Display a web content through an iframe.

Available Events
Event Description
onResize Invoked when control need to resize
onLoad Invoked when the frame load.
onError Invoked when the frame load fail
Example
var myControl = new UWA.Controls.Web({
    url: 'http://netvibes.com'
});

myControl.inject(myControlContainer);
// OR
myControlContainer.appendChild(myControl.getContent());
Parameters
Name Type Description
options Object

Options hash or a option/value pair.

Properties
Name Type Argument Default Description
url String <optional>
'about:blank'

Web Content url

width String <optional>
'100%'

Iframe width

height String <optional>
'100%'

Iframe height

className String <optional>
'uwa-web'

Customized container classname

scrolling String <optional>
'auto'

Display Iframe scroller bars

border Boolean <optional>
false

Display Iframe borders

sandbox Boolean <optional>
false

Enable Iframe sandbox (Also disable plugin like flash)

withMessage Boolean <optional>
false

Display a message during loading / if embed is forbidden

Extends

  • UWA.Controls.Abstract

Index

Methods

buildSkeleton()

Build main dom elements.

setSrc(src)

Set the src attribute of the iframe (start loading process).

Parameters
Name Type Description
src String

setIFrameHeight(height)

Set the iFrame height.

Parameters
Name Type Description
height Number

isBlank() → {Boolean}

Returns true if iframe src target the 'about:blank' url, false otherwise.

Returns
Type
Boolean

getIFrame() → {UWA/Element}

Returns the underlying iframe UWA/Element.

Returns
Type
UWA/Element