Electron Framework

website·Indexed 43 days ago

https://www.electronjs.org/

A framework for building cross-platform desktop applications using JavaScript, HTML, and CSS by embedding Chromium and Node.js. Documentation includes API references for the app module and ipc-main, tutorials on sandbox behavior, native macOS addons with Swift and Objective-C, and guides for debugging with VSCode.

Tokens
296K
Snippets
1.3K
Records
2.4K
Agent score
74%

What's inside Electron

  1. Overview of Electron framework

    Electron is an open-source framework that embeds Chromium and Node.js to enable the development of cross-platform desktop applications using JavaScript, HTML, and CSS. It allows apps to run natively on macOS, Windows, and Linux across all supported architectures, providing a stable rendering target via its bundled Chromium build.
  2. Overview of WebTorrent

    WebTorrent is a torrent client written entirely in JavaScript that enables peer-to-peer file transfer directly in the web browser using WebRTC. It allows website users to form a distributed, decentralized browser-to-browser network without requiring browser plugins, extensions, or local installations.
  3. Overview of the Ghost publishing platform

    Ghost is an open-source, hackable platform designed for professional publishing, including blogs, magazines, and independent journalism. It focuses on a streamlined writing experience and provides authors with full ownership and control over their content and business model.
  4. Overview of the Electron framework

    Electron is a framework for building cross-platform desktop applications for Windows, macOS, and Linux using JavaScript, HTML, and CSS. It achieves this by embedding Chromium and Node.js into its binary, allowing developers to maintain a single JavaScript codebase without requiring native development experience.
  5. Overview of the ServiceWorkerMain class

    The ServiceWorkerMain class represents an instance of a Service Worker, specifically a version of a script for a given scope. This class is available only in the Main process and is not exported from the 'electron' module; it is obtained as a return value from other Electron API methods.
  6. Overview of ipcMain for Main-to-Renderer Communication

    The ipcMain module is an Event Emitter used in the main process to handle messages sent from a renderer process. It supports both asynchronous and synchronous communication. To send a message from the main process to a renderer process, use webContents.send.
  7. Overview of WebTorrent

    WebTorrent is a torrent client written entirely in JavaScript that enables peer-to-peer (P2P) transport using WebRTC. It allows users to form a distributed, decentralized browser-to-browser network for efficient file transfer without requiring browser plugins, extensions, or local installations.
  8. Overview of Electron contentTracing

    The contentTracing module is used to collect tracing data from Chromium to find performance bottlenecks. It operates in the Main process. Because it does not include a web interface, recorded traces must be viewed using the Chromium trace viewer at chrome://tracing in Chrome. This module should only be used after the app module's ready event has been emitted.
    const { app, contentTracing } = require('electron')
    
    app.whenReady().then(() => {
      (async () => {
        await contentTracing.startRecording({
          included_categories: ['*']
        })
        console.log('Tracing started')
        await new Promise(resolve => setTimeout(resolve, 5000))
        const path = await contentTracing.stopRecording()
        console.log('Tracing data recorded to ' + path)
      })()
    })
    
  9. Overview of Beaker Browser and Dat protocol

    Beaker is an experimental peer-to-peer web browser built on Electron. It utilizes the Decentralized Archive Transport (Dat) protocol to enable users to host websites directly from their own devices without the need for traditional servers. When a user visits a Dat site, the files are downloaded locally, allowing the user to save, fork, and modify the site.
  10. Overview of Electron Forge

    Electron Forge is the official tool for packaging and distributing Electron applications. It provides a unified, extensible interface for the build tooling ecosystem. Key capabilities include application packaging, code signing, customizable installers for Windows, macOS, and Linux (DMG, deb, MSI, PKG, AppX), automated publishing to cloud providers (GitHub, S3, Bitbucket), and support for native Node.js modules.
  11. Overview of the IncomingMessage class

    The IncomingMessage class is used to handle responses to HTTP/HTTPS requests. It is available in the Main and Utility processes. Note that this class is not exported from the 'electron' module; it is only available as a return value from other Electron API methods. It implements the Node.js Readable Stream interface and is an EventEmitter.
  12. Overview of ipcMain for Main Process communication

    The ipcMain module is an Event Emitter used in the main process to handle messages sent from a renderer process (web page). It supports both asynchronous and synchronous communication. To send messages from the main process to a renderer process, use webContents.send.