Skip to content

Commit

Permalink
Add xpath helper to valueGetters in analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jan 13, 2025
1 parent 201f48d commit 9626de6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/nationalarchives/lib/analytics-helpers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const valueGetters = {
return expanded.toString() === "true" ? "opened" : "closed";
},
closestHeading: ($el) => getClosestHeading($el),
xpath: ($el) => getXPathTo($el.target),
};

export { getXPathTo, getClosestHeading, valueGetters };

0 comments on commit 9626de6

Please # to comment.