Update document, window
This commit is contained in:
@ -5,7 +5,7 @@ tags: browser,beginner
|
||||
|
||||
Gets the protocol being used on the current page.
|
||||
|
||||
- Use `window.location.protocol` to get the protocol (`http:` or `https:`) of the current page.
|
||||
- Use `Window.location.protocol` to get the protocol (`http:` or `https:`) of the current page.
|
||||
|
||||
```js
|
||||
const getProtocol = () => window.location.protocol;
|
||||
|
||||
Reference in New Issue
Block a user