|
From: | Giorgio Maone |
Subject: | Re: New wrappers |
Date: | Fri, 10 Sep 2021 17:19:36 +0200 |
User-agent: | None of Your Business 1.0 |
Giorgio finished the development of the improved wrapping code dealing with the bugs realted to early injection and reliable injection in Firefox when wisiting pages with CSP. See https://pagure.io/JS-Shield/JS-Shield/blob/nscl3/f/docs/new_wrapper.md.That's correct.
Giorgio, I am little confused about wrapped_name and callable_name. Is the following true?
"Generally speaking, use wrapped_name whenever you need to access the original objects only inside
the wrapper and you do not need to pass the object to other code, such as `Promise` objects or
callbacks. Compared to `callable_name`, `wrapped_name` has less overhead and is the preferred way."
Am I right that it does not make sense to define both callable_name and wrapped_name?
It usually doesn't, but IMHO keeping the ability to define both is good for flexibility sake: even though in current wrappers (at least those which I've worked on) you needed either one or the other, you can actually define both in order to keep around 2 references for possibly different purposes:
As things are currently set up, depending on what you want to do,
you can have one, the other or both.
Do you think we can make the documentation less confusing about this point?
Thanks!
-- G
Thanks
Libor
-- Giorgio Maone https://maone.net
[Prev in Thread] | Current Thread | [Next in Thread] |