


the supporting platforms (only if specific). The haxe externs are attributed with following metadata: Spin up the included demo application to see electron in action: # Clone this repository # Build haxedoc.xml to insure everything is fineīy default hxelectron/electron-api.json is used if you ommit the path argument to your custom description file. Haxe -macro ElectronAPI.generate("optional/path/to/electron-api.json") To (re)generate for another electron version download the description file from and run: # Generate type definitions Haxelib git electron Generate Type DefinitionsĪll type definitions are generated from electron-api.json by ElectronAPI.hx. Fossies Dox: electron-18.3.9.tar. Your client-side ID is available in the Environments tab of your project under Account settings page.Haxe type definitions for electron, a framework for building cross-platform desktop applications with JavaScript, HTML, and CSS. About: Electron is a framework for creating native cross platform applications with web technologies like JavaScript, HTML, and CSS. The client-side ID authorizes your application to connect to a particular environment within LaunchDarkly. This documentation indicates what arguments a method. To set up the main process client, you need the client-side ID for your LaunchDarkly environment, an object containing user properties, and optional configuration properties. The API reference documentation provides detailed information about a function or object in Node.js. In the normal use case, there is an SDK client running in the main process and the renderer processes can then create client instances that are in effect mirrors of the main one. DevDocs Preferences Offline Data Changelog Guide About Report a bug. We designed the LaunchDarkly Electron SDK to use LaunchDarkly feature flags from within any of these processes. Electron 19.0.8 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more. These processes have their own independent JavaScript engines and data spaces, although there are ways to communicate between them. # In earlier versions, the package name was ldclient-electron COPY Initializing the clientĮvery Electron application consists of a main process, which is similar to a Node.js application, and some number of renderer processes, each of which is a Chromium web browser with its own window. The resulting object uses the Node-style API. When you create the main-process client, after you call initializeInMain, pass the client object to createNodeSdkAdapter. To make this transition easier, the LaunchDarkly Electron SDK provides an optional wrapper that emulates the Node.js SDK. For instance, in the server-side Node SDK, variation() is an asynchronous call that takes a callback, whereas in the client-side SDKs it is synchronous. Learn more about electron-api-docs: package health score, popularity, security, maintenance, versions and more. The Electron SDK also includes features that are specific to Electron, such as the ability to access main-process flags from the front end as described below.įor developers who were using the server-side Node.js in Electron before the Electron SDK was available, there are differences between the APIs that can be inconvenient.The client-side and mobile SDKs, which normally evaluate flags for just one user at a time, use a much more efficient protocol where they request only the active variation for each flag for that specific user. The server-side SDKs download your entire flag data using this key, because they have to be able to evaluate flags quickly for any user.The client-side and mobile SDKs use different credentials that do not allow this. If you embed this SDK key in an application, any user who looks inside the application can then access all of your feature flag definitions, which may include sensitive data such as other users' email addresses.

The server-side SDKs include an SDK key that can download the entire definition, including rollout rules and individual user targets, of all of your feature flags.There are several reasons why this distinction matters: However, we strongly discourage this because the server-side Node.js SDK is not meant for applications that are distributed to users. Why use this instead of the Node.js SDK?īecause Electron is based on Node.js, it is possible to run the LaunchDarkly server-side Node.js SDK in it. To learn more, read Using LaunchDarkly with TypeScript. The sample code snippets for this SDK are available in both JavaScript and TypeScript, where the sample code differs.
