{"size": 536, "ext": "js", "max_stars_repo_path": "Core/AppThread/App.js", "max_stars_repo_name": "Tekyon-Org/tekyon-ui", "max_stars_repo_stars_event_min_datetime": "2020-11-03T15:47:25.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-19T11:10:16.000Z", "max_issues_repo_path": "Core/AppThread/App.js", "max_issues_repo_name": "Tekyon-Org/tekyon-ui", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Core/AppThread/App.js", "max_forks_repo_name": "Tekyon-Org/tekyon-ui", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.2903225806, "max_line_length": 74, "alphanum_fraction": 0.6231343284}
/**
 * Tekyon UI
 * App Thread Interface
*/

import {Event} from '../Event';

export var AppThread = {

    // App thread
    worker: null,

    // Whether the App thread is the Main thread
    isMainThread: !(typeof document==="undefined")

};

export var App = {

    // Initializes the App thread
    init: (worker) => {
        AppThread.worker = worker;

        // Start listening for proxied events
        Event.listen(worker);
    }

}

// Initialize the thread on which this file is imported, as the App Thread
App.init(self);