chromiumembedded / java-cef

Java Chromium Embedded Framework (JCEF). A simple framework for embedding Chromium-based browsers in other applications using the Java programming language.
https://bitbucket.org/chromiumembedded/java-cef
Other
605 stars 135 forks source link

Load html directly #453

Closed LansV closed 6 months ago

LansV commented 8 months ago

Hello, I want to load the directly generated html text directly in the browser instead of using loadUrl()

JScheiterbauer commented 8 months ago

Hi! You can use data urls for this: See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs Only thing is they have length limitation. If this is getting a problem, you can also write it to the file system and load it via file:// url

LansV commented 8 months ago

Thank you for your answer It would be great if there is native method support

JScheiterbauer commented 8 months ago

This was available once but then removed (don't know why...)

magreenblatt commented 6 months ago

This is not supported by Chromium. See https://github.com/chromiumembedded/cef/issues/2586