com.google.code.flexiframe

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

com.google.code.flexiframe

T-san
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
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Greg Dove
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 <[hidden email]> 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
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

T-san
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Greg Dove
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

T-san
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Greg Dove
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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Harbs
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
HTH,
Harbs

On Dec 17, 2019, at 6:51 AM, Greg Dove <[hidden email]> 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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎

Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

T-san
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"
                xmlns:j="library://ns.apache.org/royale/basic"
                xmlns:js="org.apache.royale.html.*">
  
     <js:WebBrowser width="100%" height="100%" id="browser" url="https://royale.apache.org/" />

</j:Application>  

On Tue, Dec 17, 2019 at 4:05 PM Harbs <[hidden email]> 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
HTH,
Harbs

On Dec 17, 2019, at 6:51 AM, Greg Dove <[hidden email]> 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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Harbs
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 <[hidden email]> 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"
                xmlns:j="library://ns.apache.org/royale/basic"
                xmlns:js="org.apache.royale.html.*">
  
     <js:WebBrowser width="100%" height="100%" id="browser" url="https://royale.apache.org/" />

</j:Application>  

On Tue, Dec 17, 2019 at 4:05 PM Harbs <[hidden email]> 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
HTH,
Harbs

On Dec 17, 2019, at 6:51 AM, Greg Dove <[hidden email]> 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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎

Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Andrew Wetmore
Harbs, can I turn this into a tutorial for the Royale blog?

On Tue, Dec 17, 2019 at 3:58 PM Harbs <[hidden email]> 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 <[hidden email]> 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"
                xmlns:j="library://ns.apache.org/royale/basic"
                xmlns:js="org.apache.royale.html.*">
  
     <js:WebBrowser width="100%" height="100%" id="browser" url="https://royale.apache.org/" />

</j:Application>  

On Tue, Dec 17, 2019 at 4:05 PM Harbs <[hidden email]> 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
HTH,
Harbs

On Dec 17, 2019, at 6:51 AM, Greg Dove <[hidden email]> 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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎



--
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Harbs
Sure. Why not?

On Dec 17, 2019, at 10:19 PM, Andrew Wetmore <[hidden email]> wrote:

Harbs, can I turn this into a tutorial for the Royale blog?

On Tue, Dec 17, 2019 at 3:58 PM Harbs <[hidden email]> 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 <[hidden email]> 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"
                xmlns:j="library://ns.apache.org/royale/basic"
                xmlns:js="org.apache.royale.html.*">
  
     <js:WebBrowser width="100%" height="100%" id="browser" url="https://royale.apache.org/" />

</j:Application>  

On Tue, Dec 17, 2019 at 4:05 PM Harbs <[hidden email]> 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
HTH,
Harbs

On Dec 17, 2019, at 6:51 AM, Greg Dove <[hidden email]> 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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎



--

Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Greg Dove
In reply to this post by Andrew Wetmore

Andrew, there are some CORs related console errors with this, but it might be a good starting point:

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
initialize="onInit"
xmlns:js="library://ns.apache.org/royale/basic" >
<fx:Script><![CDATA[

private function onInit():void{
COMPILE::JS{
(iframe.element as HTMLIFrameElement).sandbox = "allow-top-navigation allow-forms allow-scripts allow-same-origin";
}
}

]]></fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView>
<js:View width="100%"
height="100%">
<js:WebBrowser localId="iframe" url="https://royale.apache.org/" width="50%" height="100%"/>
</js:View>
</js:initialView>
</js:Application>


Combines what Harbs said for init, plus a few other mandatory things.

On Wed, Dec 18, 2019 at 9:19 AM Andrew Wetmore <[hidden email]> wrote:
Harbs, can I turn this into a tutorial for the Royale blog?

On Tue, Dec 17, 2019 at 3:58 PM Harbs <[hidden email]> 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 <[hidden email]> 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"
                xmlns:j="library://ns.apache.org/royale/basic"
                xmlns:js="org.apache.royale.html.*">
  
     <js:WebBrowser width="100%" height="100%" id="browser" url="https://royale.apache.org/" />

</j:Application>  

On Tue, Dec 17, 2019 at 4:05 PM Harbs <[hidden email]> 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
HTH,
Harbs

On Dec 17, 2019, at 6:51 AM, Greg Dove <[hidden email]> 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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎



--
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

T-san
Greg, great thanks.

I tried your markup but Edge does not show the output. At my office, Chrome is prohibited to use. I compiled using VSCode.  

If you used VS code, could your share your asconfig.json with us?

2019年12月18日(水) 5:50 Greg Dove <[hidden email]>:

Andrew, there are some CORs related console errors with this, but it might be a good starting point:

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
initialize="onInit"
xmlns:js="library://ns.apache.org/royale/basic" >
<fx:Script><![CDATA[

private function onInit():void{
COMPILE::JS{
(iframe.element as HTMLIFrameElement).sandbox = "allow-top-navigation allow-forms allow-scripts allow-same-origin";
}
}

]]></fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView>
<js:View width="100%"
height="100%">
<js:WebBrowser localId="iframe" url="https://royale.apache.org/" width="50%" height="100%"/>
</js:View>
</js:initialView>
</js:Application>


Combines what Harbs said for init, plus a few other mandatory things.

On Wed, Dec 18, 2019 at 9:19 AM Andrew Wetmore <[hidden email]> wrote:
Harbs, can I turn this into a tutorial for the Royale blog?

On Tue, Dec 17, 2019 at 3:58 PM Harbs <[hidden email]> 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 <[hidden email]> 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"
                xmlns:j="library://ns.apache.org/royale/basic"
                xmlns:js="org.apache.royale.html.*">
  
     <js:WebBrowser width="100%" height="100%" id="browser" url="https://royale.apache.org/" />

</j:Application>  

On Tue, Dec 17, 2019 at 4:05 PM Harbs <[hidden email]> 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
HTH,
Harbs

On Dec 17, 2019, at 6:51 AM, Greg Dove <[hidden email]> 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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎



--
--
Shoichiro Takeshita
武下 祥一郎
Reply | Threaded
Open this post in threaded view
|

Re: com.google.code.flexiframe

Andrew Wetmore
In reply to this post by Greg Dove
Thank you!

On Tue, Dec 17, 2019 at 4:50 PM Greg Dove <[hidden email]> wrote:

Andrew, there are some CORs related console errors with this, but it might be a good starting point:

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
initialize="onInit"
xmlns:js="library://ns.apache.org/royale/basic" >
<fx:Script><![CDATA[

private function onInit():void{
COMPILE::JS{
(iframe.element as HTMLIFrameElement).sandbox = "allow-top-navigation allow-forms allow-scripts allow-same-origin";
}
}

]]></fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView>
<js:View width="100%"
height="100%">
<js:WebBrowser localId="iframe" url="https://royale.apache.org/" width="50%" height="100%"/>
</js:View>
</js:initialView>
</js:Application>


Combines what Harbs said for init, plus a few other mandatory things.

On Wed, Dec 18, 2019 at 9:19 AM Andrew Wetmore <[hidden email]> wrote:
Harbs, can I turn this into a tutorial for the Royale blog?

On Tue, Dec 17, 2019 at 3:58 PM Harbs <[hidden email]> 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 <[hidden email]> 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"
                xmlns:j="library://ns.apache.org/royale/basic"
                xmlns:js="org.apache.royale.html.*">
  
     <js:WebBrowser width="100%" height="100%" id="browser" url="https://royale.apache.org/" />

</j:Application>  

On Tue, Dec 17, 2019 at 4:05 PM Harbs <[hidden email]> 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
HTH,
Harbs

On Dec 17, 2019, at 6:51 AM, Greg Dove <[hidden email]> 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/" 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 <[hidden email]> wrote:
Greg, is there any sample code snippet to use WebBrowser.as?

2019年12月17日(火) 12:10 Greg Dove <[hidden email]>:
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 <[hidden email]> wrote:
Greg, thanks for a good news.  Will try.

2019年12月17日(火) 12:04 Greg Dove <[hidden email]>:
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 <[hidden email]> 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
武下 祥一郎



--


--