Detecting Microsoft's edge or spartan with javascript

前端 未结 5 1388
情深已故
情深已故 2021-01-03 22:15

Is the user agent for Edge or Spartan browsers known already? Can anyone tell me how to detect this browser and diferentiate it from IE in advance of its release?

5条回答
  •  生来不讨喜
    2021-01-03 22:50

    Look for "Edge" in the UA string.

    While in the minds of the marketing people the world is perfect, in reality browsers have bugs that remain unfixed for years and it will always be the case.

    In my case the issue that required me to test for Edge versus Chrome is the Chrome dropdown height bug that Spartan/Edge renders correctly. Microsoft has nothing to fix here and Google has been ignoring that bug for over a year now (it was rendering correctly in old versions of Chrome).

提交回复
热议问题