<html>
Adds the capability to display HTML pages.

JavaScript: lz.html
extends <view> » <node> » lz.Eventable »

<html> is a <view> that displays HTML pages.

For best results in Flash, set the wmode attribute to 'transparent' when embedding the application. See examples/extensions/html-swf.jsp for an example. See examples/extensions/html.lzx for an example of embedding <html> in a window.

<canvas> 
    <view y="50" width="100%" height="300" bgcolor="blue" onmousedown="res.apply()" onmouseup="res.remove()">
        <resizestate name="res"/>
        <dragstate name="drg"/>
        <text width="100%" bgcolor="gray" onmousedown="parent.drg.apply()" onmouseup="parent.drg.remove()">Drag here</text>
        <html id="ht" src="http://google.com/" x="15" y="15" width="${parent.width - 30}" height="${parent.height - 30}"/>
    </view>
</canvas>
edit

html extends <view>, which is the fundamental visual class of LZX.

Attributes

Name Type (tag) Type (js) Default Category
framename string String   read/write
  Sets the name/target of the html iframe.
history expression Boolean true read/write
  If true, the html tag will set browser history.
loading boolean Boolean false readonly
  If true, the html tag is currently loading
minimumheight number Number 0 read/write
  The minimum height of the iframe: embedded swfs won't load with a size less than 1
minimumwidth number Number 0 read/write
  The minimum width of the iframe: embedded swfs won't load with a size less than 1
mouseevents boolean Boolean true read/write
  If true, attempt to listen for mouse events on the iframe. Cross-domain security restrictions apply, so if the content loaded in the iframe is from a different domain, mouse events won't be sent.
ready expression Boolean false readonly
  If true, the html tag is ready to receive commands
scrollbars boolean Boolean true read/write
  If true, the html tag will have scrollbars.
shownativecontextmenu boolean Boolean true read/write
  If true, show native context menus in the iframe. Otherwise, show OpenLaszlo context menus. Note that this only works in DHTML because it's not possible to programatically display a context menu in Flash.
src text String   read/write
  Sets the URL the html tag should load
target expression lz.view this.parent read/write
  Sets the view to listen to for x/y/width/height change events. Defaults to this.parent.
visible boolean Boolean true read/write
  Sets the visibility of the html tag

Methods

bringToFront()
html.bringToFront();

callJavascript()
html.callJavascript(methodName : String, callbackDel : lz.handler, ...args);
Calls a method in the the loaded page.
Parameter Name Type Description
methodName String The name of the method to call
callbackDel lz.handler An optional LzDelegate which will be called with the return value from the method call.
...args    

restoreSelection()
html.restoreSelection();
Restores a selection in the iframe. Currently only works in IE 7.

scrollBy()
html.scrollBy(x : Number, y : Number);
Scrolls the html tag to a specific position.
Parameter Name Type Description
x Number x position to scroll to
y Number y position to scroll to

sendToBack()
html.sendToBack();

storeSelection()
html.storeSelection();
Stores a selection from the iframe, to be restored later by restoreSelection(). Currently only works in IE 7.

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Name Description
onload  
onready  
onsrc  

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy