Fixed unclear syntax and gendered language

Cleaned up some bad grammar in the summary. Replaced occurrences of "he" with gender neutral language.
This commit is contained in:
Ian Witham 2017-07-09 12:04:46 +12:00 committed by GitHub
parent 33c7a30b10
commit acf0b2f0ea

View file

@ -22,7 +22,7 @@ For example:
alert("Hello"); alert("Hello");
``` ```
The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until he deals with the window. In this case -- until he presses "OK". The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK".
## prompt ## prompt
@ -40,7 +40,7 @@ It shows a modal window with a text message, an input field for the visitor and
`default` `default`
: An optional second parameter, the initial value for the input field. : An optional second parameter, the initial value for the input field.
The visitor may type something in the prompt input field and press OK. Or he can cancel the input by pressing a CANCEL button or hitting the `key:Esc` key. The visitor may type something in the prompt input field and press OK. Or they can cancel the input by pressing a CANCEL button or hitting the `key:Esc` key.
The call to `prompt` returns the text from the field or `null` if the input was canceled. The call to `prompt` returns the text from the field or `null` if the input was canceled.
@ -101,7 +101,7 @@ We covered 3 browser-specific functions to interact with the visitor:
`confirm` `confirm`
: shows a message and waits the user to press "OK" or "CANCEL". It returns `true` for OK and `false` for CANCEL/`key:Esc`. : shows a message and waits the user to press "OK" or "CANCEL". It returns `true` for OK and `false` for CANCEL/`key:Esc`.
All these methods are modal: they pause the script execution and don't let the visitor to interact with the rest of the page until he dismisses them. All these methods are modal: they pause the script execution and don't allow the visitor to interact with the rest of the page until the message has been dismissed.
There are two limitations shared by all the methods above: There are two limitations shared by all the methods above: