-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: partially support chrome.tabs.update #30069
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested the original issue, which is now fixed, and code looks great. Had one question about an error message, not blocking 👍
// Don't let the extension crash the browser or renderers. | ||
if (IsKillURL(url)) { | ||
const char kNoCrashBrowserError[] = | ||
"I'm sorry. I'm afraid I can't do that."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂 I actually like this message, but would it be possible for us to give the user more of a hint about what went wrong? Looking at kill_hosts[]
above, would a user be trying to intentionally kill their tab/app by passing one of these URLs in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually copy-pasted directly from Chromium: https://source.chromium.org/chromium/chromium/src/+/main:chromecast/browser/extensions/api/tabs/tabs_constants.cc;l=84;drc=479cc17585a64910853e9949b053499ecbeca9a5
This only happens if an extension tries to do something like chrome.tabs.update(tabId, { url: 'chrome://crash' })
.
CI failures unrelated; merging. |
Release Notes Persisted
|
What is the expected behavior? I'm on electron 14.2.1 and when links are clicked nothing happens. Hovering over the link shows the pointer (as expected). I'm rendering the PDF with an embed tag in a Renderer process. Thanks. |
Description of Change
Adds partial support for the
chrome.tabs.update
extensions API, to supportlink clicks in PDFs.
Closes #29091.
Checklist
npm test
passesRelease Notes
Notes: Clicking a hyperlink in a PDF now does what you'd expect.