feat: add tabs.create support in bridge extension#314
Open
wangjc683 wants to merge 1 commit into
Open
Conversation
- Add 'create' method handler in background.js tabs command - Add TMWebDriver.newtab() method to open new tabs via bridge - Uses chrome.tabs.create API, bypassing popup blocker - Tested with active/inactive, duplicate URLs, rapid consecutive opens
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore the ability to open new browser tabs, lost after
f0ff7eeremovedTMWebDriver.newtab()(which relied on TampermonkeyGM_openInTab).Changes
assets/tmwd_cdp_bridge/background.js(+6 lines)createmethod to thetabscommand handler inhandleExtMessagechrome.tabs.create()withurlandactiveoptions{ id, url, title, windowId }TMWebDriver.py(+6 lines)newtab(url=None, active=True)method{cmd:"tabs", method:"create", ...}and routes through existingexecute_js()→ WS → bridge pathTesting
All scenarios passed (8 tabs created):
active=False(background)active=True(foreground)