Sure. Why not?

> On Dec 17, 2019, at 10:19 PM, Andrew Wetmore <[email protected]> wrote:
> 
> Harbs, can I turn this into a tutorial for the Royale blog?
> 
> On Tue, Dec 17, 2019 at 3:58 PM Harbs <[email protected] 
> <mailto:[email protected]>> wrote:
> Try changing js:WebBrowser to j:WebBrowser.
> 
> The prefix needs the namespace you used for “j”.
> 
>> On Dec 17, 2019, at 2:59 PM, Takeshita Shoichiro <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Greg and Harbs, thanks.
>> 
>> As I do not fully understand the Royale markup at moment.  Unfortunately, 
>> the following markup does not show the Royale Website.  What's wrong with it?
>> And if I want to display image, using source ="test.jpg" is fine?
>> 
>> Appreciate your all help in advance.
>> 
>> ===========================================================================================
>> <?xml version="1.0" encoding="utf-8"?>
>> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009 
>> <http://ns.adobe.com/mxml/2009>"
>>                 xmlns:j="library://ns.apache.org/royale/basic 
>> <http://ns.apache.org/royale/basic>"
>>                 xmlns:js="org.apache.royale.html.*">
>>   
>>      <js:WebBrowser width="100%" height="100%" id="browser" 
>> url="https://royale.apache.org/ <https://royale.apache.org/>" />
>> 
>> </j:Application>  
>> 
>> On Tue, Dec 17, 2019 at 4:05 PM Harbs <[email protected] 
>> <mailto:[email protected]>> wrote:
>> Here’s it in use in an actual app:
>> 
>>     <js:WebBrowser width="100%" height="100%" id="browser" url="{url}" />
>> 
>> I also have this code on intiComplete:
>> 
>>                     
>> browser.addEventListener("locationChanged",locationChanged);
>>                 (browser.element as HTMLIFrameElement).sandbox = 
>> "allow-top-navigation allow-forms allow-scripts allow-same-origin";
>> 
>> If you need more extensive communication, take a look at postMessage: 
>> https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage 
>> <https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage>
>> HTH,
>> Harbs
>> 
>>> On Dec 17, 2019, at 6:51 AM, Greg Dove <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> Sorry, I don't know of any. That class looked like it was intended for what 
>>> you needed, but I have not used it myself. When I needed the type of thing 
>>> that you described in the past, I wrote a custom component to do that, but 
>>> it looked like WebBrowser had part of the setup I had used when I did that.
>>> I just pushed a quick fix for startup url value assignment.
>>> I was able to get it displaying something that way with this:
>>> 
>>> <js:WebBrowser url="https://royale.apache.org/ 
>>> <https://royale.apache.org/>" width="400" height="400"/>
>>> 
>>> 
>>>  it seems that both Alex and Harbs have worked on that. Maybe they can 
>>> provide more info. 
>>> 
>>> 
>>> On Tue, Dec 17, 2019 at 4:47 PM Takeshita Shoichiro <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> Greg, is there any sample code snippet to use WebBrowser.as?
>>> 
>>> 2019年12月17日(火) 12:10 Greg Dove <[email protected] 
>>> <mailto:[email protected]>>:
>>> I was just looking at the original lib. It has a bunch of extra api methods 
>>> etc. It might need some effort to add in the various ExternalInterface 
>>> calls that the original lib had if you need those. But basically, the Flex 
>>> lib was reaching out to html to do this. In Royale you are already 'closer' 
>>> to the iframe, so it should be relatively easy.
>>> 
>>> 
>>> On Tue, Dec 17, 2019 at 4:06 PM Takeshita Shoichiro <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> Greg, thanks for a good news.  Will try.
>>> 
>>> 2019年12月17日(火) 12:04 Greg Dove <[email protected] 
>>> <mailto:[email protected]>>:
>>> That should be quite easy. 
>>> 
>>> Either it should be easy to do it directly, or it looks like you could use: 
>>>  org.apache.royale.html.WebBrowser
>>> from Basic lib.
>>> I did not use this yet, but it seems like it should be what you need.
>>> 
>>> 
>>> On Tue, Dec 17, 2019 at 4:00 PM Takeshita Shoichiro <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> Hi,
>>> 
>>> Our application uses this library extensively to display page-size image as 
>>> embedded.
>>> 
>>> How it would be easy or difficult to make it work in Royale?
>>> -- 
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>> -- 
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>> -- 
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>> 
>> 
>> 
>> -- 
>> Shoichiro Takeshita
>> 武下 祥一郎
> 
> 
> 
> -- 
> Andrew Wetmore
> 
> http://cottage14.blogspot.com/ <http://cottage14.blogspot.com/>
> 
> 
> 
> 

Reply via email to