Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#4021 closed defect (fixed)

The logic that checks for Edge is incorrect in adblockplusedge

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):

https://codereview.adblockplus.org/29342906/

Description

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 (7)

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

comment:5 Changed 4 years ago by sebastian

  • Keywords edge removed

comment:6 Changed 4 years ago by oleksandr

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:7 Changed 4 years ago by sebastian

  • Sensitive unset
Note: See TracTickets for help on using tickets.