I know it is possible to override functions in JS, however is it possible to override implementation of conditional statements like ''if''.
Update As asked by some comments, I am building a chrome extension goal is to log and edit when ever if statement is executed on a webpage.
You can't override conditionals directly.
If you want, you can wrap them in a function and then override the function, which might accomplish what you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.