Open Jhon-Idrovo opened 7 months ago
There won't be any userAgent sniffing ever in this module and the issue seems to be on HTMLAnchorElement not providing the whole standard API: https://github.com/WebReflection/linkedom/blob/main/esm/html/anchor-element.js
I think your issue is bigger than charAt
as most of your urlParsing.xxx
expectations are broken ... but there is a proper API in Web standards that is URL
that doesn't need DOM at all to work ... I am not keen to consider patches that workaround anything at all that diverges on MSIE detection as that's a defunct browser and for good so, eventually, all I can think in here that could happen is that somebody files a PR that adds accessors (getters only) methods to that prototype that simply forward the result of new URL(this.href).prototcol
or host
or search
or pathname
and call it a day, as that's not even part of the rendering pipe so it's acceptable as bloat nobody asked, or needed, to date.
Are you that person that would file that PR? 😉
When used with axios I'm finding this error:
I did the work of following the stack trace and found where is the problem. At line 41 in https://github.com/axios/axios/blob/v1.x/lib/helpers/isURLSameOrigin.js
Seems like Axios checks if the browser is a "standard" one by creating an element. The problem is that it expects that when you create an anchor element it sets itself the
pathname
property when you add thehref
property.I tried setting the user agent to
msie
ortrident
but the issue is still showing up