mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 12:09:40 +00:00
Add LoadHtml extensions method - use data uri to load the html
This commit is contained in:
@@ -481,9 +481,7 @@ namespace CefSharp.WinForms.Example
|
||||
if (control != null)
|
||||
{
|
||||
const string html = "<html><head><title>Test</title></head><body><h1>Html Encoded in URL!</h1></body></html>";
|
||||
var base64EncodedHtml = Convert.ToBase64String(Encoding.UTF8.GetBytes(html));
|
||||
control.Browser.Load("data:text/html;base64," + base64EncodedHtml);
|
||||
|
||||
control.Browser.LoadHtml(html, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user