<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustdoc/html/static/source-script.js, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-07-07T15:52:18+00:00</updated>
<entry>
<title>Clean up rustdoc static files</title>
<updated>2021-07-07T15:52:18+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2021-07-07T12:27:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e5c24ba400b2744455868c2ac4292d8ee3b1b0be'/>
<id>urn:sha1:e5c24ba400b2744455868c2ac4292d8ee3b1b0be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix eslint errors</title>
<updated>2021-05-15T11:09:28+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2021-05-14T11:56:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ccabd4eedf982e3fcf7f730efc8ff1c7b0ee88f7'/>
<id>urn:sha1:ccabd4eedf982e3fcf7f730efc8ff1c7b0ee88f7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #85117 - jsha:bubble-bubble-toil-and-trouble, r=GuillaumeGomez</title>
<updated>2021-05-12T15:19:27+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2021-05-12T15:19:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90f6fe852b64818cf48375cd47ddde3eafa12cfc'/>
<id>urn:sha1:90f6fe852b64818cf48375cd47ddde3eafa12cfc</id>
<content type='text'>
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 simplifies 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).

Demo at https://hoffman-andrews.com/rust/bubble-bubble-toil-and-trouble/std/string/struct.String.html

Note: this conflicts with / depends on #85074. Once that's merged I'll rebase this and resolve conflicts.

Part of #83332. Thanks to `@Manishearth` for the [suggestion to not reimplement bubbling](https://github.com/rust-lang/rust/issues/83332#issuecomment-803497509).

r? `@GuillaumeGomez`
</content>
</entry>
<entry>
<title>Move global click handlers to per-element ones.</title>
<updated>2021-05-11T20:45:08+00:00</updated>
<author>
<name>Jacob Hoffman-Andrews</name>
<email>github@hoffman-andrews.com</email>
</author>
<published>2021-05-09T18:21:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=09454513d196613e3e60ab52b7479f9d65d6270a'/>
<id>urn:sha1:09454513d196613e3e60ab52b7479f9d65d6270a</id>
<content type='text'>
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).
</content>
</entry>
<entry>
<title>rustdoc: remove explicit boolean comparisons.</title>
<updated>2021-05-11T17:50:09+00:00</updated>
<author>
<name>Jacob Hoffman-Andrews</name>
<email>github@hoffman-andrews.com</email>
</author>
<published>2021-05-09T20:49:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f510e412e93958e099334de22de375d26264e767'/>
<id>urn:sha1:f510e412e93958e099334de22de375d26264e767</id>
<content type='text'>
For boolean variables it's shorter and more readable to check the value
directly, or negate it with `!`.

In a couple of cases I reordered an if/else pair because it made the
initial `if` statement simpler.

Removed unused isType parameter from two functions.
</content>
</entry>
<entry>
<title>Fix some bugs reported by eslint</title>
<updated>2021-01-25T09:32:58+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2021-01-23T13:55:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=042facb9357f9b6248b0b2b6c5624742c3948e47'/>
<id>urn:sha1:042facb9357f9b6248b0b2b6c5624742c3948e47</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve JS performance by storing length before comparing to it in loops</title>
<updated>2021-01-15T21:52:33+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2020-12-30T15:36:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7cd8128da3d81bdc8f6e9da19f09f236c1703800'/>
<id>urn:sha1:7cd8128da3d81bdc8f6e9da19f09f236c1703800</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove elements iterator clone and only keep first element instead</title>
<updated>2020-07-16T16:34:49+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2020-07-16T16:34:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=52c65e05f53e7a49345bc3041e5656735fdc4f9c'/>
<id>urn:sha1:52c65e05f53e7a49345bc3041e5656735fdc4f9c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Focus on the current file in the source file sidebar</title>
<updated>2020-07-14T13:45:01+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2020-07-14T13:45:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=382d5bb715859423a086c6b26e651c18adf0dcb9'/>
<id>urn:sha1:382d5bb715859423a086c6b26e651c18adf0dcb9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix eslint lints</title>
<updated>2020-05-26T09:18:10+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2020-05-17T13:34:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f41d284ea0b87187e84d6edab4f9a71542cfd1b1'/>
<id>urn:sha1:f41d284ea0b87187e84d6edab4f9a71542cfd1b1</id>
<content type='text'>
</content>
</entry>
</feed>
