I have written following VB.Net code (see below) to display an HTML file containing Unicode characters greater than 0xFFF.
Dim sText As XElement =
<html>
<head>
<style type="text/css">
unicode
{
background-color: yellow;
}
</style>
</head>
<body>
<script type='text/javascript'>
function clickUnicode()
{
var sValue = "?";
window.external.notify(sValue);
}
</script>
<div class="unicode" onclick="clickUnicode()">😀</div>
<div class="unicode" onclick="clickUnicode()">😁</div>
<div class="unicode" onclick="clickUnicode()">😂</div>
<div class="unicode" onclick="clickUnicode()">😃</div>
<div class="unicode" onclick="clickUnicode()">😄</div>
<div class="unicode" onclick="clickUnicode()">😅</div>
<div class="unicode" onclick="clickUnicode()">😆</div>
<div class="unicode" onclick="clickUnicode()">😇</div>
</body>
</html>]
wv.Settings.IsScriptNotifyAllowed = True
wv.Settings.IsJavaScriptEnabled = True
wv.NavigateToString(sText)
When I analyse the result (see Image), I see that <script> text and <style> text has been added as TEXT.
Normally only emoticons are visible !
Is it possible to add <style> and <script> to html file contained in .Net WebView control ? How ?
If I copy HTML element in an HTML file and I double click on it, I obtain following result on Chrome
@schlebe
I have put any tag because following tags are not accepted !
VB.Net Javascript CSS WebView WinForm