I am building a Chrome extension, and assigned command _execute_browser_action
to Alt+J. I want to simulate this in background.js which li
You can't trigger keyboard shortcuts on your own.
Think of it this way as a timeline of events:
Your code only triggers 5 (internal jQuery events).
By directly manipulating DOM events, you can go up to 4.
Under no circumstance can an extension go back to 3 in this stack.
You're trying to open your popup in a roundabout way from code. Sadly, this is simply not possible at all for "ordinary" extensions - a conscious decision on part of Chrome dev team.
Think of another way to provide UI, say, notifications or injecting something in the current page with Content Scripts.