-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Detect inspector protocol version #7127
Comments
I think we can use |
We can get the version more directly from JS running on the page (e.g. via |
@peterflynn no it's not too late, we can do that during the interstitial page. Just to be extra clear, knowing the chrome version is only half the battle. We still need to have our own mapping of what protocol version maps to what chrome version. I'm not sure that's desirable. |
Since there are only two protocol versions we support and there's a clear line in its version history where Chrome switched from one to the other, it doesn't seem that bad to me. It's not like a caniuse matrix with lots of different browsers hitting the mark at different times or anything... |
Low priority to @redmunds |
We should note this in the release notes for 38, since it shows up as a console error and people might think something is wrong. |
I just went ahead and did that. |
FBNC @jasonsanjose since the PR has now landed. I'll remove the release notes entry. |
@jasonsanjose Are you around to verify this today? |
Confirmed. Closing. |
To fix #6830, PR #7008 uses both the deleted
CSS.getAllStylesheets
API (for Chrome < 34) and the newstyleSheetAdded/styleSheetRemoved
events.Users using Chrome >= 34 may see an inconsequential console error in Brackets' dev tools:
We log all inspector protocol errors to the console, even in this case where we expect it to fail in some versions of Chrome. In this case, once we detect the API is missing, we disable future calls during the session and rely only on the new events.
Here are some options so that we don't log the error:
protocol.json
from http://src.chromium.org/viewvc/blink/trunk/Source/devtools/protocol.json. We could do this client side with someuserAgent
sniffing or natively if we can read the Chrome version from the native OS. The drawback here is maintaining this mapping for each Chrome version.The text was updated successfully, but these errors were encountered: