Welcome Guest Search | Active Topics | Sign In | Register

HTML Comment before loading page Options
Touchway
Posted: Thursday, March 14, 2019 12:00:57 PM
Rank: Member
Groups: Member

Joined: 8/5/2016
Posts: 17
Hi guys,
since the first version of WebBrowser (using new V19 Chrome engine) the webview shows a HTML comment with
Code: HTML/ASPX
<!--eo.blank -->

before every page load.

Here's a screenshot:


This bug is new and exists only on engine version >= 19 (even on 19.0.69).

I hope you can fix this.


Thank you!

eo_support
Posted: Friday, March 15, 2019 12:54:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

The screenshot doesn't really show much. :( eo.blank is a special Url we use internally to initialize the WebView and it should not be visible to your application. How do you get this value in your code? If you tell us that we might be able to figure out where this value "leaked" out.

Thanks!
Touchway
Posted: Monday, March 18, 2019 5:59:06 AM
Rank: Member
Groups: Member

Joined: 8/5/2016
Posts: 17
We simply add the WebView in the xaml- File:

Code: XML
<Grid Margin="0">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="Auto" x:Name="ConsoleRow"></RowDefinition>
        </Grid.RowDefinitions>
        <eo:WebControl x:Name="myWebControl" Grid.Row="0" Padding="0" Margin="0">
            <eo:WebControl.WebView>
                <eo:WebView x:Name="twWebView"></eo:WebView>
            </eo:WebControl.WebView>
        </eo:WebControl>
        <Border Grid.Row="1" Background="White" Padding="5">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <Button HorizontalAlignment="Right" FontSize="11" Margin="0,0,5,0" BorderThickness="1" Background="White" Foreground="Black" Padding="10,2" Content="Reload" Click="Reload"></Button>
                <Button HorizontalAlignment="Right" FontSize="11" Margin="0,0,5,0" BorderThickness="1" Background="White" Foreground="Black" Padding="10,2" Content="Start remote debugger" Click="RemoteDebugger"></Button>
                <Button HorizontalAlignment="Right" FontSize="11" BorderThickness="1" Background="White" Foreground="Black" Padding="10,2" Content="Copy JSON request" Click="CopyJSON"></Button>
            </StackPanel>
        </Border>
    </Grid>


And then load the URL using:

Code: C#
twWebView.LoadUrl(_URL);


We additionally use following methods to inject custom JavaScript and CSS:
Code: C#
twWebView.JSInitCode += CustomJS;


Code: C#
twWebView.SetOptions(new EO.WebEngine.BrowserOptions
            {
                EnableWebSecurity = WebSecurity,
                UserStyleSheet = (!String.IsNullOrEmpty(CustomCSS)) ? CustomCSS : null,
                AllowJavaScriptAccessClipboard = true,
                AllowJavaScriptDOMPaste = true
            });
eo_support
Posted: Monday, March 18, 2019 8:26:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

What is the value of the Url you are trying to load?

Thanks!
Touchway
Posted: Monday, March 18, 2019 8:39:40 AM
Rank: Member
Groups: Member

Joined: 8/5/2016
Posts: 17
We use some very unspectacular urls like "https://www.google.com" and some localhost urls with custom port:
http://localhost:8080/index.html
http://localhost/index.php

I've noticed that the latest update (19.0.83) I installed today has solved the problem?!
eo_support
Posted: Monday, March 18, 2019 8:41:47 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
We did not change anything about this in 19.0.83. :(
Touchway
Posted: Monday, March 18, 2019 8:56:36 AM
Rank: Member
Groups: Member

Joined: 8/5/2016
Posts: 17
I think I found the problem.
You can reproduce the issue using an empty WebView by registering some custom URL schemes:
Code: C#
EO.WebBrowser.Runtime.RegisterCustomSchemes("php", "rest", "data");


If I delete this line, the html comment disappears (tested with 19.056 and 19.0.69).

Thanks
Lukas
eo_support
Posted: Tuesday, March 19, 2019 10:05:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

Thanks for the additional information. This is indeed an issue that has been corrected in build 19.0.83 while we were fixing another issue. The root of the problem is internally before 19.0.83 we treat all custom scheme as having "standard" Url format (in the form of scheme://host/path). This is not the case for "data" Urls.

In build 19.0.83 we no longer apply such rules for the Url format for custom schemes. Because "data" is already an internally recognized scheme, register custom scheme "data" will have no impact at all this build. In previous build it had the impact of forcing standard Url format for this scheme, which caused the problem you observed.

Please feel free to let us know if there is anything else.

Thanks



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.