Change 20100727-philip-shd by phi...@philip-i7 on 2010-07-27 16:30:39 EDT
    in /cygdrive/c/clients/laszlo/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Modify HTML component so you can style elements inside it.

New Features:

Bugs Fixed: LPP-9244 (partial), LPP-9240

Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Overview:


Details:

html.lzx:
- Added setStyle method to html.lzx. This sends the id/name/value of the element to style to the iframemanager.

iframemanager.js:
- Added setStyle method to set the style of any element (by id). Any errors generated are caught and discarded. - Moved calling asyncCallback until the end of __gotload(). There was a subtle race condition when you generate the onload event before setting __loading to false. In my case, the onload event generates a number of callJavascript() calls back into the iframemanager and expects an immediate return of the data. - Added check in setZ to ignore setting z to a null value. setZ is called by code in html component using the z value from the sprite. However, I found some cases where the sprite hasn't initialized the z value.


Tests:

This test will style a div element in the html component when you click the button.

test10.lzx:

<canvas height="600">

<simplelayout />
<button onclick="parent.myhtml.setStyle('mydiv', 'backgroundColor', 'yellow')">Change Color</button>
<html name="myhtml" width="400" height="100" src="test10.html"/>

</canvas>


test10.html:

<body>
<div id="mydiv">Div text to be styled.</div>
</body>


Files:
M       lps/components/extensions/html.lzx
M       lps/includes/source/iframemanager.js


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100727-philip-shd.tar

Reply via email to