endo icon indicating copy to clipboard operation
endo copied to clipboard

wip(captp): add new hooks

Open kumavis opened this issue 1 year ago • 1 comments

Changes to captp required to support ExtRefController in https://github.com/endojs/endo/pull/2473

Captp

  • new hooks:
    • gcHook: called when remote says they dont need your export
    • onBeforeImportHook: allows you to specify a presence for a slot (similar to importHook)
    • onBeforeExportHook: allows you to specify a slot for a value (similar to exportHook)
    • missingExportHook: allows you to fill in an export missing from the table
  • new methods:
    • importSlot: you provide a new presence for a slot and captp registers it
    • exportValue: you specify a value and slot and it is added to the export table
  • newly exposed method:
    • makeRemoteKit: sets up the HandledPromie for communicating with a remote slot, does not register the presence in the table

kumavis avatar Oct 02 '24 17:10 kumavis

on the call it was suggested this could be done another way. maybe by all of:

  • passing in import/export tables
    • replaces opts.gcHook (export table)
    • replaces opts.missingExportHook (export table)
    • replaces captp.exportValue (export table)
    • replaces captp.importSlot (import table)
  • providing a slot provider
    • replaces opts.onBeforeExportHook (retrieving slot)
  • providing a presence creator
    • replaces opts.onBeforeExportHook (creating a presence)
  • still need captp.makeRemoteKit

kumavis avatar Oct 02 '24 21:10 kumavis

replaced by https://github.com/endojs/endo/pull/2564

kumavis avatar Oct 28 '24 21:10 kumavis