Does JxBrowser support chromium's webview tag? - webview

I'm evaluating JCEF, electron, NW.js and JxBrowser for the support of nested webview tag.
I see that electron and NW.js support webview tag but nesting is not supported.
Does JxBrowser support webview tag? sample page with webview tag didnt work. Any pointer is appreciated.

JxBrowser doesn't support <webview> tag.
In Chromium, this tag is a part extension API and is not available for regular web pages. We don't expose this API either.
The only way to embed content in JxBrowser is to use <iframe> elements.

Related

How to stop automatic download on IE 11 while using iframe

I have given a source in a Iframe tag, my is issue is that when the page loads on IE the download begins automatically and it generally happens on IE installed on windows 8.
<div> <iframe src="../../Images/Sample.pdf" width="800px" height="800px" ></iframe> </div>
It's downloaded probably because there is not Adobe Reader plug-in
installed. In this case IE (it doesn't matter which version) doesn't
know how to render it and it'll simply download file (Chrome, for
example, has its own embedded PDF renderer).
That said. is not best way to display a PDF (do not forget
compatibility with mobile browsers, for example Safari). Some browsers
will always open that file inside an external application (or in
another browser window). Best and most compatible way I found is a
little bit tricky but works on all browsers I tried (even pretty
outdated):
Keep your but do not display a PDF inside it, it'll be filled
with an HTML page that consists of an tag. Create an HTML
wrapping page for your PDF, it should look like this:
<html>
<body>
<object data="your_url_to_pdf" type="application/pdf">
<embed src="your_url_to_pdf" type="application/pdf" />
</object>
</body>
</html>
Of course you still need the appropriate plug-in installed in the
browser. Also take a look to this post if you need to support Safari
on mobile devices.
1st. Why nesting inside ? You'll find answer here on
SO. Instead of nested tag you may even provide a custom
message for your users (or a built-in viewer, see next paragraph).
2nd. Why an HTML page? So you can provide a fallback if PDF viewer
isn't supported. Internal viewer, plain HTML error messages/options
and so on...
It's tricky to check PDF support so you may provide an alternate
viewer for your customers, take a look to PDF.JS project, it's pretty
good but rendering quality - for desktop browsers - isn't as good as a
native PDF renderer (I didn't see any difference in mobile browsers
because of screen size, I suppose).
See also: HTML embedded PDF iframe

How to generate iframe embed code in jwplayer?

I am using jwplayer in my grails application. I want to generate iframe embed code so that I can us it in my other website and play.How can I generate iframe embed code from jwplayer ?
Can I have exact code that needs to be generated ? Any help will be good.
Thanks
89neuron
If jwplayer is working in your grails app, no reason iframe will affect its activities.
Something like
<iframe src="http://www.yourgrails.com"/>
in your reference page will suffice

IOS UIWebView encoding

I am creating a browser with UIWebView. When I browse some non-English web site that is missing a meta tag, which means that UIWebView will use default encoding, then I can not see the web site show correctly...
how can I fix this problem?
you could consider using the stringByEvaluatingJavaScriptFromString: method on your UIWebView to add some javascript dynamically. The javascript could append an appropriate <meta> element to the <head> of the document.

Firefox question: Is it possible to create an html iframe which loads a document from my extension using the chrome://?

I was wondering if it is possible to create an iframe whithin a HTML document pointing to a XUL document whithin my firefox extension such like:
<iframe src="chrome://myextension/content/document.xul"/>
I am currently getting security errors when trying to do this. I've already tried the contentaccessible=yes flag in my chrome.manifest but it didn't work.
Is there any workaround to get this working?
Thanks.
No, web pages are generally not allowed to load chrome documents. contentaccessible=yes refers to images and scripts that are less regulated security-wise (they can also be used across domains). However, your extension has permission to load chrome documents - even into a content page. So doing something like this from your extension will work:
window.content.frames[0].location.href = "chrome://myextension/content/document.xul";
Not sure whether this will help you, depends on what you are trying to achieve.

Open a frame in a jquery dialog

I am trying to load a frame-set in a dialog:
$("#dialog").load ("myFrame.html).dialog ({title:"Edit Info"}).dialog('open');
the dialog opens but empty, the frame is not loading. No error in firebug either.
If I try to open a simple page then it's loading OK (minus the css though).
Is there an inherit limitation of opening a frameset in a dialog?
I'm using jQuery 1.4.4 and jQueryUI 1.8.6
Thanks
Mike
Is there an inherit limitation of opening a frameset in a dialog?
Yes, there is, as explained in the jQuery docs:
jQuery uses the browser's .innerHTML property to parse the retrieved document and insert it into the current document. During this process, browsers often filter elements from the document such as <html>, <title>, or <head> elements. As a result, the elements retrieved by .load() may not be exactly the same as if the document were retrieved directly by the browser.
Browsers will discard many of the structural elements of a page and this includes framesets. The only way to display framesets inside another page is using an iframe.

Resources