You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme_2.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,12 @@ This documentation explains the architecture of Reactime v4.
3
3
4
4

5
5
6
-
In the src folder, there are three directory: app, backend, and extension.
6
+
In the src folder, there are three directories: app, backend, and extension.
7
7
8
8
9
-
The app folder is responsible a SPA application that you see when you open the chrome dev tools under the reactime tab.
9
+
The app folder is responsible a SPA that you see when you open the chrome dev tools under the Reactime tab.
10
10
11
-
The backend folder is responsible for generating data and handle timejump request from the background.js scripts in extension.
11
+
The backend folder is responsible for generating data and handle time-jump request from the background.js scripts in extension.
12
12
13
13
The extension folder is where the contentscript.js and background.js located. These two files belongs to Chrome internal to help us handle requests both from the web browser and from the chrome dev tools. Unsure what contentscripts and backgroundscripts are? The details implementation are documented in the files themselves.
14
14
@@ -25,7 +25,7 @@ Just to reiterate, contentscript is use to read and modify information that is r
25
25
26
26
The general flow of data is described in the following steps:
27
27
28
-
1. When the background bundle is loaded from the browser, it injects a script into the dom. This script uses a technique called [throttle](https://medium.com/@bitupon.211/debounce-and-throttle-160affa5457b) to get the data of the state to send to the contentscript every specified miliseconds.
28
+
1. When the background bundle is loaded from the browser, it injects a script into the dom. This script uses a technique called [throttle](https://medium.com/@bitupon.211/debounce-and-throttle-160affa5457b) to get the data of the state of the app to send to the contentscript every specified miliseconds (in our case, it's 70ms).
29
29
30
30
31
31
2. This contentscript always listens to the messages being sent from the interface of the browser. The recieved data will immediately be sent to the background script which then update an object that persist in background script called **tabsObj**. Each time tabsObj is updated, the most recent version will be sent to the interface of reactime dev tools written the app folder.
0 commit comments