partytown
partytown copied to clipboard
feat: add return value hook
Add a new hook for intercepting return value. Can be used to modify return value or prevent an object from being returned.
returnValue(opts) {
if (opts.nodeName === '#document' && opts.name === 'cookie') {
return 'hooked-' + opts.rtnValue;
}
return opts.rtnValue;
}
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
partytown | ✅ Ready (Inspect) | Visit Preview | Dec 15, 2022 at 11:59AM (UTC) |
Would the get
hook instead be able to work in this scenario?
@emilisb thanks for your commitment, this PR is stale. Is it abandoned?
This PR is old, so I'm closing this for now. Feel free to re-open it if it's still valid. Thanks.