Changes between Version 11 and Version 12 of Ticket #5090


Ignore:
Timestamp:
05/18/2017 02:41:21 AM (2 years ago)
Author:
mjethani
Comment:

I've updated the description based on the discussion on Rietveld where we decided to use feature detection as originally planned.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5090 – Description

    v11 v12  
    44=== What to change === 
    55 
    6 Check the platform and platform version via the `info` module to determine if user stylesheets are supported (i.e. if we are running on Firefox 53+ as of now). 
    7  
    8 When a content script sends a `get-selectors` message, if user stylesheets are supported, try injecting the stylesheet from the backround page using `tabs.insertCSS({..., cssOrigin: "user})`. 
     6When a content script sends a `get-selectors` message, try injecting the stylesheet from the backround page using `tabs.insertCSS({..., cssOrigin: "user})`. 
    97 
    108If the stylesheet was injected by `insertCSS()` and no devtools panel is active for the same tab, send following response: 
     
    2725}}} 
    2826 
    29 If user stylesheets are not supported, set `inject` to `true` and always include the `selectors`, regardless whether the devtools panel is active: 
     27If `insertCSS()` failed for any reason, set `inject` to `true` and always include the `selectors`, regardless whether the devtools panel is active: 
    3028 
    3129{{{ 
     
    3735}}} 
    3836 
     37If `insertCSS()` failed with the error message "Error processing cssOrigin", remember this and don't try to use `insertCSS()` again next time, instead behave exactly as if `insertCSS()` failed. 
     38 
    3939Adapt the content script, so that it doesn't attempt to inject a stylesheet if `inject` is `false`. 
    4040