Tag: Window object

Recent Post

How to call a function with a delay in JavaScript

Learn how you can delay a function call using setTimeout() – and cancel one you've already set.

Detect a user’s language preference with JavaScript

Detect and use a user's language preference to format display values.

The this keyword in JavaScript (simple explanation)

The 'this' keyword is a versatile reference to a parent data object.

How to copy text to the clipboard (and read it) in JavaScript

How to copy text content to a user's clipboard.

Page event listeners: DOMContentLoaded, load, beforeunload and unload

Sometimes we want some code to run only when a page has reached a certain state of loading (e.g. the

How to open a new browser window from JavaScript

Use the open() method on the window object to open a new window in the browser.