How to use event-kit - 10 common examples

To help you get started, we’ve selected a few event-kit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github benogle / kitty-detect-app / src / main-window / kitty-canvas.js View on Github external
constructor(delay) {
    this.events = []
    this.ranEvents = []
    this.delay = delay
    this.isRunning = false
    this.emitter = new Emitter()
  }
github atom / github / lib / items / mock-item.js View on Github external
constructor(props) {
    super(props);
    this.emitter = new Emitter();
    this.title = 'PR #18705';
    this.hasTerminatedPendingState = false;
  }
github atom / github / lib / models / ref-holder.js View on Github external
constructor() {
    this.emitter = new Emitter();
    this.value = undefined;
  }
github Foundry376 / Mailspring / app / src / registries / command-registry.es6 View on Github external
constructor() {
    this.emitter = new Emitter();
    this.listenerCounts = {};
    this.listenerCountChanges = {};
  }
github atom / atom / src / history-manager.js View on Github external
constructor({ project, commands, stateStore }) {
    this.stateStore = stateStore;
    this.emitter = new Emitter();
    this.projects = [];
    this.disposables = new CompositeDisposable();
    this.disposables.add(
      commands.add(
        'atom-workspace',
        { 'application:clear-project-history': this.clearProjects.bind(this) },
        false
      )
    );
    this.disposables.add(
      project.onDidChangePaths(projectPaths => this.addProject(projectPaths))
    );
  }
github atom / github / lib / atom / panel.js View on Github external
constructor(props) {
    super(props);

    this.subscriptions = new CompositeDisposable();
    this.panel = null;
    this.didCloseItem = false;
    this.domNode = document.createElement('div');
    this.domNode.className = 'react-atom-panel';
  }
github atom / github / lib / atom / dock-item.js View on Github external
constructor(props) {
    super(props);

    this.subscriptions = new CompositeDisposable();
    this.dockItem = null;
    this.didCloseItem = false;
    if (props.stubItem) {
      this.domNode = this.props.stubItem.getElement();
    } else {
      this.domNode = document.createElement('div');
      this.domNode.className = 'react-atom-dockitem';
    }
  }
github atom / github / lib / items / stub-item.js View on Github external
constructor(name, props = {}, uri) {
    this.emitter = new Emitter();
    this.subscriptions = new CompositeDisposable();

    this.name = name;
    this.props = props;
    this.uri = uri;
    this.key = ++key;
    this.element = document.createElement('div');
    this.element.classList.add(`github-StubItem-${name}`);
    this.realItem = null;
    this.realItemPromise = new Promise(res => {
      this.resolveRealItemPromise = res;
    });
  }
github atom / github / lib / controllers / repository-conflict-controller.js View on Github external
constructor(props, context) {
    super(props, context);

    this.state = {openEditors: this.props.workspace.getTextEditors()};
    this.subscriptions = new CompositeDisposable();
  }
github atom / github / lib / controllers / comment-decorations-controller.js View on Github external
constructor(props, context) {
    super(props, context);

    this.subscriptions = new CompositeDisposable();
    this.state = {openEditors: this.props.workspace.getTextEditors()};
  }

event-kit

Simple library for implementing and consuming evented APIs

MIT
Latest version published 6 years ago

Package Health Score

53 / 100
Full package analysis