diff options
| author | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2021-05-09 11:21:38 -0700 |
|---|---|---|
| committer | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2021-05-11 13:45:08 -0700 |
| commit | 09454513d196613e3e60ab52b7479f9d65d6270a (patch) | |
| tree | daa9b5d6c5432b0fd8bd1b3a57bb91042c948736 /compiler/rustc_errors/src | |
| parent | 6fd7a6dc0f5c4c8fd51d57c0f4f795d52481f904 (diff) | |
| download | rust-09454513d196613e3e60ab52b7479f9d65d6270a.tar.gz rust-09454513d196613e3e60ab52b7479f9d65d6270a.zip | |
Move global click handlers to per-element ones.
In rustdoc's main.js, we had an onclick handler for the whole document that would dispatch to handlers for various elements. This change attaches the handlers to the elements that trigger them, instead. This simplfies the code and avoids reimplementing the browser's bubbling functionality. As part of this change, change from a class to an id for help button. Move the handlers and associated code for highlighting source lines into source-script.js (and factor out a shared regex).
Diffstat (limited to 'compiler/rustc_errors/src')
0 files changed, 0 insertions, 0 deletions
