代码之家  ›  专栏  ›  技术社区  ›  karthick

这个openlaszlo代码出了什么问题?

  •  1
  • karthick  · 技术社区  · 13 年前

    我想知道这个代码出了什么问题

    <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="text.html" x="15" y="15" width="${parent.width - 30}" height="${parent.height - 30}"/>
        </view>
    </canvas>
    

    代码被编译了,但我不能在swf版本中看到html,但我可以在dhtml版本中看到html。我也尝试过指定url,但没有结果

    2 回复  |  直到 13 年前
        1
  •  2
  •   raju-bitter Luca Carlon    13 年前

    它看起来像<html>对于一些基于Webkit的浏览器(Chrome和Safari),OpenLaszlo5.0(trunk)的SWF10运行时中的标记功能被破坏,但也存在其他问题。我对代码进行了一些修改以进行一些测试:

    <canvas>
      <button text="OpenLaszlo" onclick="ht.setAttribute('src', 'http://www.openlaszlo.org')" />
      <button y="40" text="test.html" onclick="ht.setAttribute('src', 'test.html')" />
      <view y="200" 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://www.openlaszlo.org" x="15" y="15" width="${parent.width - 30}" height="${parent.height - 30}"/>
      </view>
    </canvas>
    

    以下是我看到的SWF10运行时代码的结果:

    • InternetExplorer9、Chromium 18和Opera 12:这两个页面(localtest.html和OpenLaszlo)都显示在iFrame中。
    • Firefox:显示远程网站OpenLaszlo.org,但未显示本地test.html。
    • Safari 5.1和Chrome 21:这两个页面都未显示在iFrame中

    我会提交 OpenLaszlo Jira bug,并向 laszlo-dev 参考此讨论的开发人员邮件列表。

        2
  •  1
  •   Kmeixner    13 年前

    自2006年以来,我一直在OpenLaszlo中进行开发,并尝试使用OpenLaszlo<html>SWF运行时下的标记是,我加载到其中的页面有一半工作,一半不工作。我遇到过这样的情况,即使是谷歌的简单网页也无法工作,这是一个非常不稳定的类,我不建议使用它。