From acbfb8c3bdbcb29b23b11221ae2ec1386b061aa7 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 27 Jun 2023 17:18:50 +0200 Subject: Replace `id` attribute with `name` for `` tag --- src/librustdoc/html/static/js/source-script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librustdoc/html/static/js/source-script.js') diff --git a/src/librustdoc/html/static/js/source-script.js b/src/librustdoc/html/static/js/source-script.js index d999f3b36fd..6eb99136040 100644 --- a/src/librustdoc/html/static/js/source-script.js +++ b/src/librustdoc/html/static/js/source-script.js @@ -3,13 +3,13 @@ // Local js definitions: /* global addClass, getCurrentValue, onEachLazy, removeClass, browserSupportsHistoryApi */ -/* global updateLocalStorage */ +/* global updateLocalStorage, getVar */ "use strict"; (function() { -const rootPath = document.getElementById("rustdoc-vars").attributes["data-root-path"].value; +const rootPath = getVar("root-path"); const NAME_OFFSET = 0; const DIRS_OFFSET = 1; -- cgit 1.4.1-3-g733a5