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.
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