AI-SDC / SACRO-Viewer

A tool for fast, secure and effective output checking, which can work in any TRE.
Other
2 stars 1 forks source link

Get the actual value a file's href instead of using the .href parser #129

Closed ghickman closed 1 year ago

ghickman commented 1 year ago

HTMLAnchorElement.href [1] is a parser for the href attribute of an anchor which gives the fully qualified URL. In non-dev mode this produces a broken URL of the form /?path=[…]contents?path=[…]&name=[…]. The contents of the href is the URL we want to directly use inside our JS code so we're accessing just that value instead.

1: https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/href