Yes, like a macro.
From XY problem's (https://meta.stackexchange.com/q/66377/369514) point of view, I'm asking Y. My initial problem is I'm creating chrome extension, that injects a code to a webpage and sends a message back. To do that I need to insert an ID of extension. This is a place where I want to change `chrome.runtime.id` to a constant before injecting a function to a webpage (which is serialized before that)