How would Chrome handle this scenario.
Suppose I have two extensions installed. One extension that turns the page blue and the other one that turns the page red. Which extension gets priority?
The final behaviour depends on the following factors:
Specifity of the CSS selectors. Example: html body
is more specific than body
.
Shorthand properties: background-color:red;
always overrides background:cyan;
.
The existence of the !important
flag: !important
declarations can only be overridden by another !important
declaration.
Order of execution: Extensions which are installed more recently are executed last.
This means that the extension which was (re)loaded in the end will "win", provided that the previous decision rules were undecided.
Both extensions will execute. The one that executes first will turn the page to one color, the second to other color. Last color prevails.
The sequence of execution depends on many things, for example, if both extensions are listening to the same event, the sequence depends on which added its listener first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With