I'm sure it's already rendered to a static presentation-level (HTML/template language du jour) form at that point. That wouldn't work.
It's also still visible if someone is using noscript (actually, I have no idea if Facebook works with noscript, probably not).
The solution you are suggestion doesn't solve the problem and injects more corner cases.