This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)
Given the code
| # <类型>: (类型的值见下面描述) <主题> (最多50个字) | |
| # 解释为什么要做这些改动 | |
| # |<---- 请限制每行最多72个字 ---->| | |
| # 提供相关文章和其它资源的链接和关键字 | |
| # 例如: Github issue #23 | |
| # --- 提交 结束 --- | |
| # 类型值包含 |
| import AppKit | |
| class PreferencesViewController: NSTabViewController { | |
| private lazy var tabViewSizes: [NSTabViewItem: NSSize] = [:] | |
| override func tabView(_ tabView: NSTabView, didSelect tabViewItem: NSTabViewItem?) { | |
| super.tabView(tabView, didSelect: tabViewItem) | |
| if let tabViewItem = tabViewItem { |
| /** | |
| * MAKE ELECTRON APP FEEL MORE NATIVE | |
| * | |
| * * Prevent dragging all HTML elements, specially: | |
| * - images | |
| * - links (anchors) | |
| * | |
| * * Prevent text selection | |
| */ |
windows
| // | |
| // debounce-throttle.swift | |
| // | |
| // Created by Simon Ljungberg on 19/12/16. | |
| // License: MIT | |
| // | |
| import Foundation | |
| extension TimeInterval { |
Create the app and download the necessary dependencies.
Content of the Gist is from a talk by Peggy Rayzis at Chain React 2017: Chain React 2017: Breaking Down Bridging in React Native by Peggy Rayzis
In order for a native code to talk to JS you would need a bridge.