Function
hookWS
({ onBefore, onAfter, modifyUrl } = {})
Source from the content-addressed store, hash-verified
| 272 | |
| 273 | // WARNING: experimental |
| 274 | export function hookWS({ onBefore, onAfter, modifyUrl } = {}) { |
| 275 | if (!readyWs) { |
| 276 | initWS(); |
| 277 | readyWs = true; |
| 278 | } |
| 279 | return hook([ |
| 280 | { fn: modifyUrl, arr: modifyUrlWsFn }, |
| 281 | { fn: onBefore, arr: onBeforeWSFn }, |
| 282 | { fn: onAfter, arr: onAfterWSFn }, |
| 283 | ]); |
| 284 | } |
| 285 | |
| 286 | /* hookWS example |
| 287 | hookWS({ |
Callers
nothing calls this directly
Tested by
no test coverage detected