How couild i load electron window in webpage? - javascript

How to execute electron window and load that electron window into webpage to show how our application will look after build

As someone in the comment section mentioned electron just provides a way to run the web components on desktop. Therefore, If you want to see how the desktop app will look, just serve your javascript application directly on any port and open it just like any other web application.
Think of electron as an extra layer on top of your web application.

Related

how to enable javascript of remote web page in electron app popup browserwindow

I have an electron (4.0) app. I'm using the openid/appauth-js node module.
This module brings up a native browser window when performing openid connect hybrid flows.
(I am using IdentityServer 3 for the server)
I want to use an electron BrowserWindow instead.
The flow works up to the point where the consent screen is shown.
The consent screen has a minified version of jQuery (v1.11.0) followed by Bootstrap (v3.0.3).
The page displays fine in native browser, but in electron I get the message "Bootstrap requires jQuery"
I've tried set the browserwindow option nodeIntegration:true (I appreciate this is overkill). I've partially looked at pre-load aswell, but I think this is undesirable as the web service could be used by other clients.
I've also tried --enable-sandbox together with sandbox: true, but this breaks the main window.
I've also tried debugging the javascript code to identify why it fails to run correctly, but its complicated due to the openid flow interaction.
I require the popup window to execute remote resource javascript like a chrome or other mainstream browser.
Instead Bootstrap fails to recognise jQuery is already loaded

Multiple http pages on electron

I am using electron to convert my web app to desktop. I have two HTML pages that I would like the user to be able to access. Is there an elegant way to switch between pages via electron? Im thinking like a side panel or something similar. I have tried electron tabs and it was no good.
Electron only provides a headless chrome environment to run your app in. There should be no difference between your web app and your electron app functionality wise.

How can I open a chrome tab on my laptop from my react-native app (like remote debugging does)?

I am creating a small debugging app to monitor a particular interaction (WebRTC) between two users of my main app.
I have a web app (React) and a mobile app (React-Native) that each connect through socket.io to a node server I created. This node server's purpose is to collect information from both users, and display this information in a web page in real time.
My web app has a button that when you click it it opens up that debugging web page in a new tab with the debugging information; I just use window.open. Is it possible to do something similar from my mobile device, running a react-native application? That is, can I click a button and have a browser tab open on my laptop somehow? Does React-Native remote debugging work with something like this?
There is currently no supported way you can do this in React Native.
However, you can certainly add it yourself.
Navigate to node_modules/react-native/local-cli/server/middleware/getDevToolsMiddleware.js
Look for launchChrome(debuggerURL);, you can invoke another launchChrome function with your desired URL.
This will only appear when you select Debug JS Remotely.
You can configure the CLI server code more to launch the URL when you are not debugging.

Load electron atom app inside of another electron app

I discover new frameworks for developing desktop apps. I found electron atom and it looks very well and matured. But I have one qustion:
Is it possible to host different electron apps in one big electron app?
in our .NET applications we have a "global framework" Form, which loads different applications in frames. But every application can runs for itself and can be compiled to an exe-file.
The goal is to write different standalone apps, but with the possibility to create a "suite". For example I have apps for notes, todo lists, calculating,...
and I will give the user the chance to get "all of them in one app" (the apps will display in different tabs for example).
Is this possible? And if yes, please provide some links to a guide or else.

Offline only app for smartphones in Javascript

Can I write a offline only application using HTML, CSS and Javascript ( + AngularJS) for mobile devices (for example with cordova), so the user won't need any internet connection to start and use the application. As far as I know cordova just creates a webview and I wonder now, how will the page be shown, when there is no hosting...
Imagine a simple calculator or todo app which works just offline.
Is this possible? Or do I have other ways except cordova...
The pages are hosted inside the app. The html,js,css files are packed inside the apk. When a user install the app it download the pages within the app. And webview access the pages locally. So you can make app both online and offline.
suppose the android project directory. Html pages are kept in the directory
yourprojectfolder\android\assets\www
And in the java file at the app start it just create the webview and call the index.html page. Now if you need any device function like notification / geolocation you can use them using plugin. Plugins are those that creates bridge between html and java files.
Also several databases are available for phonegap development. So you can store data locally. Go through the documentation for more and create & understand the structure.

Categories

Resources