Confirmed users
161
edits
(→Discsussion - script context in Model C: added section) |
|||
Line 195: | Line 195: | ||
** GreaseMonkey defines several GM_* globals to provide additional functionality to GM scripts. | ** GreaseMonkey defines several GM_* globals to provide additional functionality to GM scripts. | ||
** [Nickolay] Chrome implements bidirectional asynchronous message passing via <code>chrome.extension.sendReqest(json, responseCallback)</code> and another pipe (<code>Port</code>) based API for long-lived connections. | ** [Nickolay] Chrome implements bidirectional asynchronous message passing via <code>chrome.extension.sendReqest(json, responseCallback)</code> and another pipe (<code>Port</code>) based API for long-lived connections. | ||
** [Nickolay] If we are going to allow exporting APIs (e.g. window.microphone) via this mechanism, we might need sync content->jetpack messaging. bsmedberg also mentioned this as a possibility. | |||
** [Brian] suggested a similar pipe-based mechanism: <code>onNewPage: function (pipe) {</code> in the ScriptMod options. "Instead of a "pipe" argument, maybe the onNewPage function should get a "control" object, from which it can manipulate the pipe, ask about the URL from which the target page was loaded, and register to hear about the page going away. The latter would be necessary for the all-volume-control jetpack to remove closed pages from its list." | ** [Brian] suggested a similar pipe-based mechanism: <code>onNewPage: function (pipe) {</code> in the ScriptMod options. "Instead of a "pipe" argument, maybe the onNewPage function should get a "control" object, from which it can manipulate the pipe, ask about the URL from which the target page was loaded, and register to hear about the page going away. The latter would be necessary for the all-volume-control jetpack to remove closed pages from its list." | ||