Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Js improvements #50214

Merged
merged 1 commit into from
Apr 26, 2018
Merged

Js improvements #50214

merged 1 commit into from
Apr 26, 2018

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 25, 2018
@@ -40,6 +40,8 @@
"union",
"foreigntype"];

var search_input = document.getElementsByClassName('search-input')[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think i'm a little fuzzy on JS's scoping/object rules. Does this automatically get updated if someone types in a search, deletes it, then searches for something else? Having everything reference this variable here seems a little off, but my intuition is based around Rust's rules, not JavaScript's. >_>

Copy link
Member Author

@GuillaumeGomez GuillaumeGomez Apr 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider it the same as a reference (or a view). You point to an element but you get the accurate information when you access its fields.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks! C# has a similar system for what they call "reference types".

@QuietMisdreavus
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 25, 2018

📌 Commit ac0f99c has been approved by QuietMisdreavus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 26, 2018
bors added a commit that referenced this pull request Apr 26, 2018
Rollup of 4 pull requests

Successful merges:

 - #50177 (mark std::str::replace(,n) as #[must_use])
 - #50207 (Hash EntryKind::AssociatedConst const data)
 - #50214 (Js improvements)
 - #50219 (Added missing `.` in docs.)

Failed merges:

 - #50229 (Add setting to go to item if there is only one result)
@bors bors merged commit ac0f99c into rust-lang:master Apr 26, 2018
@GuillaumeGomez GuillaumeGomez deleted the JS-improvements branch April 26, 2018 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants