Frontend command is to call functions provided by SurfingKeys' frontend, such as showUsage
/ openOmnibar
etc. Content command is to call functions implemented in content windows, such as visualUpdate
/ visualClear
etc. The document is about how to refactory the command message flow between windows.
-
top
The top content window, for most page without frames, the top window is the only content window.
-
content
The content windows including top window and content windows for kinds of frames.
-
background
The background window
-
frontend
The frontend UI of SurfingKeys, created in a shadowRoot by top window.
sequenceDiagram
top->>frontend: 1. create
content->>background: 2. command message
background->>frontend: 3. forward command message
frontend->>frontend: 4. do tasks
opt message.ack === true
frontend->>background: 5. response
background->>content: 6. response
end
sequenceDiagram
top->>frontend: 1. create
content->>top: 2. command message
top->>frontend: 3. forward command message
frontend->>frontend: 4. do tasks
opt message.ack === true
frontend->>top: 5. response
top->>content: 6. response
end