Is it possible to use the webview API in a VSCode web extension?
Yes, webviews work in web extensions. Made a silly mistake when testing.
Yes, you can use the webview in vscode extensions.
Here's the link to the sample extension:
https://github.com/microsoft/vscode-extension-samples/tree/main/webview-view-sample
Related
I need a 'Download PDF' feature for my SAPUI5 app which contains Viz charts (SVG's) as well as other more standard HTML elements.
I've already looked into jsPDF, html2canvas etc.
What is the recommended method?
It needs to work both as a Web app and also as a packaged Cordova app.
This has been somewhat answered here: Save Web page directly to PDF using JS
This method should work both in web app and as a Cordova app.
As mentioned there the best choice would still be to popup the "print to PDF" window (just as pressing ctrl+p in most browsers) and letting the user save it.
Cheers.
I'm developing a safari app extension. I've to listen to "beforeNavigate" event as in old Safari JS Extensions, we could listen to these events using Safari's Windows & Tabs API.
I went through the How to create Safari App Extension, but unfortunately couldn't find anything related to these events there.
Can anybody please help me with similar APIs for Safari App Extensions as we had in old Safari JS Extensions.
Starting Safari 13, Apple added an API for page navigation notifications.
In your SafariExtensionHandler.swift, you can now override func page(_ page: SFSafariPage, willNavigateTo url: URL?).
Source: https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes
Unfortunately, there is not equivalent in Safari App Extension.
The only thing you can do is catching a new tab id displayed through validateToolbarItem.
Or try to add a content or network filter in your App...
Worklight hybrid apps back buttons are broken on IOS9 because following piece of code is broken.
window.history.back();
As per following link the solution is to use WKWebView instead of UIWebView.
https://github.com/jquery/jquery-mobile/issues/8254
We are using worklight 6.2.x, which generates IOS code, is there any alternate way to resolve this issue ?
Found a configuration change in JQuery Mobile that resolves this issue.
Problems with window.history using JQuery/Javascript on Cordova app in IOS9
The way it works in Worklight Hybrid applications is that Cordova’s ViewController is used to display, to render, the web resources - the app. This ViewController that is provided by Cordova (and cannot be replaced) uses iOS’s UIWebView.
Therefore, until Cordova addresses this in the Cordova codebase by moving from using UIWebView to using WKWebView this defect cannot be fixed in Hybrid apps generated by Worklight - because they use what Cordova supplies them with.
As a possible workaround, perhaps you can look at implementing your navigation like how it is done in the Multipage application here: https://github.com/MobileFirst-Platform-Developer-Center/MultiPageApp/blob/release71/apps/MultiPageApp/common/js/main.js
The sample project is meant to run in MobileFirst Platform Foundation 7.1, but the JavaScript is the same also in Worklight 6.2.
Telerik AppBuilder is using it's own "webview", but Apple store cannot accepts donations through app unless it's done thought Safari browser... Is there any way to open Safari browser inside App?
Thanks
You should be able to use the InAppBrowser plugin, but use the target of "_system". See the docs for more details: https://github.com/apache/cordova-plugin-inappbrowser/blob/master/doc/index.md
Use the second argument "_system" to open the link in the default browser.
Omit it to open with in the app.
window.open("www.google.com", '_system');
Is it possible to convert an existing XUL application to a pure web application without a complete rewrite? Are there any existing guides on doing this?
There is an existing project based on XUL / Mozilla Application Framework that I would like to see as a web application. But it seems that with FF4 this would no longer be possible.
You can use XUL Runner if you like to keep it like a desktop app or use the Ample SDK which supports XUL in HTML pages and it does a rendering using HTML and JavaScript.