Author: max
Date: 2007-09-04 22:18:10 -0700 (Tue, 04 Sep 2007)
New Revision: 6360

Modified:
   openlaszlo/branches/legals/lps/components/extensions/html.lzx
Log:
Change 20070904-maxcarlson-2 by [EMAIL PROTECTED] on 2007-09-04 17:22:03 PDT
    in /Users/maxcarlson/openlaszlo/legals
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Add onready event to notify applications when the <html/> is ready

New Features:

Bugs Fixed: LPP-4197 - <html> component doesn't work correctly in swf runtime

Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: Add ready attribute, onready event which is fired once the iframe 
initializes.  setSrc() remembers URLs when called early.  Update the position, 
bring to front and/or call setSrc() for early calls in setiframeid().

Tests: Updated example based on LPP-4197 that uses the <html/> API properly

<canvas debug="true"> 
    <include href="extensions/html.lzx"/> 
    <class name="browser" extends="window" resizable="true" bgcolor="silver"> 
        <html name="htmlview" widthoffset="${-19}" heightoffset="${-74}" 
xoffset="${7}" yoffset="${53}" visible="true" 
onready="this.setSrc('http://w3.org');"/> 
    </class> 
    <browser width="500" height="500" x="10" y="10"/> 
</canvas> 



Modified: openlaszlo/branches/legals/lps/components/extensions/html.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/extensions/html.lzx       
2007-09-05 04:15:36 UTC (rev 6359)
+++ openlaszlo/branches/legals/lps/components/extensions/html.lzx       
2007-09-05 05:18:10 UTC (rev 6360)
@@ -47,10 +47,12 @@
     <attribute name="loading" type="boolean" value="false"/>
     <attribute name="appendto" value="null"/>
     <attribute name="iframe" value="null"/>
+    <attribute name="ready" value="false"/>
 
     <attribute name="target" value="null" setter="this.setTarget(target)"/>
     <attribute name="framename" value="" type="string"/>
     <event name="onload"/>
+    <event name="onready"/>
     <method name="setTarget" args="t">
         if (t == null) return;
         this.target = t;
@@ -80,8 +82,10 @@
     <method name="setSrc" args="s">
         this.src = s;
         this.setAttribute('loading', true);
-        if (this.iframeid) {
+        if (this['iframeid']) {
             Lz.iframemanager.setSrc(this.iframeid, s);
+        } else {
+            this.srcset = s;
         }
         this.onsrc.sendEvent(s);
     </method>
@@ -113,10 +117,10 @@
     <method name="setiframeid" args="id">
         //Debug.write('setiframeid', id, this)
         this.iframeid = id;
-        if (this.cachepos) {
-            this.__updatepos();
-            if (this['isfront']) this.bringToFront();
-        }
+        if (this['cachepos']) this.__updatepos();
+        if (this['isfront']) this.bringToFront();
+        if (this['srcset']) Lz.iframemanager.setSrc(id, this.srcset);
+        this.setAttribute('ready', true);
     </method>
     <method name="__gotload">
         this.setAttribute('loading', false);


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to