Opened 4 years ago

Last modified 4 years ago

#4021 closed defect

The logic that checks for Edge is incorrect in adblockplusedge — at Version 4

Reported by: scottlow Assignee:
Priority: Unknown Milestone:
Module: Unknown Keywords:
Cc: sebastian, oleksandr Blocked By:
Blocking: Platform: Edge
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):


In the adblockplusedge repository, there is code that checks for Edge by doing the following: if (!("chrome" in window)). Unfortunately, we do have a chrome object, so this is not a suitable differentiator. The logic we recommend instead is if (typeof browser != 'undefined').

Change History (4)

comment:1 Changed 4 years ago by sebastian

  • Cc sebastian oleksandr added
  • Sensitive set

comment:2 in reply to: ↑ description Changed 4 years ago by sebastian

We also alias browser to chrome if it doesn't exist. So it seems that fallback wouldn't even be necessary?

Anyway, code that checks for the chrome object aims to detect the availability of the chrome-like extension API (as the same code runs on Safari as well). It seems that code specifically checking for Edge is already checking for the browser object.

comment:3 Changed 4 years ago by oleksandr

  • Keywords edge added
  • Platform changed from Internet Explorer to Edge
  • Ready set

comment:4 Changed 4 years ago by oleksandr

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.