You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
History 1.13 introduced <base> tag support in #94, but I have trouble using it.
Say I have a document with <base href="/lorem/"> running on http://localhost:8080.
And it will work. If I omit basename argument, useBasename reads basename from <base href> attribute. However, href property of base element returns full URL, therefore the resulting behavior is equivalent to this:
@taion I would love to, but I am not sure how to handle this best given existing modules. I would like to use parsePath for this, but it triggers a warning when the full URL is passed. I guess I can either reimplement extractPath or remove the warning; what do you think?
History 1.13 introduced
<base>
tag support in #94, but I have trouble using it.Say I have a document with
<base href="/lorem/">
running onhttp://localhost:8080
.I can add useBasename like this:
And it will work. If I omit
basename
argument,useBasename
readsbasename
from<base href>
attribute. However,href
property ofbase
element returns full URL, therefore the resulting behavior is equivalent to this:Since the basename is being matched against pathname, the basename won't be found and won't be stripped from the
location.pathname
.I think one way to fix this is to extract (absolute) path from the
base.href
.The text was updated successfully, but these errors were encountered: