| 20 | |
| 21 | == What's There Now == |
| 22 | |
| 23 | Currently, communication between Inspector and !WebKit occurs via two JS objects: |
| 24 | |
| 25 | * `InspectorController`, created by !WebKit and populated with methods that JS invokes to talk to WebKit. |
| 26 | * `WebInspector`, created on the JS side and used by !WebKit to talk back to inspector. Only a small fraction of `WebInspector`'s methods is actually used for this. |
| 27 | |
| 28 | For instance, when the messages in the console are cleared by the user, the `InspectorController.clearMessages()` is invoked to reset the corresponding `m_consoleMessages` in !WebKit. Conversely, whenever !WebKit has a new message to display on the console, it creates a `ConsoleMessage` JS object and then invokes `WebInspector.addMessageToConsole()` with that object as an argument. |