Tag: javascript
Page Visibility API HTML5
The Page Visibility API tells you when a tab is hidden or visible — use it to pause animations, polls, and video when the user switches tabs.
2mo ago
javascript beginner
Permissions API HTML5
The Permissions API (navigator.permissions.query()) lets you check the current state of browser permissions — granted, denied, or prompt — before requesting sensitive APIs.
2mo ago
javascript intermediate
Promise.allSettled / Promise.any / Promise.race ES2020
Three Promise combinators for handling multiple async operations — allSettled() waits for all to complete regardless of failure, any() resolves with the first success, race() resolves or rejects with the first to settle.
2mo ago
javascript intermediate
Promises & Futures PHP 7.0+
Abstractions representing the eventual result of an async operation — a Promise or Future is a placeholder for a value not yet available, enabling non-blocking code composition without nested callbacks.
2mo ago
concurrency intermediate
Prototype Chain Errors & hasOwnProperty ES2022
Iterating objects with for...in includes inherited prototype properties — use hasOwnProperty() or Object.keys() to iterate only own properties.
2mo ago
javascript intermediate
package.json & npm — Alongside composer.json npm3
package.json manages JS dependencies and build scripts for PHP projects using JavaScript — the npm counterpart to Composer.
2mo ago
javascript beginner
Performance API & User Timing ES2015
Browser APIs for measuring JavaScript execution time with high precision — performance.now(), performance.mark(), performance.measure(), and the PerformanceObserver.
2mo ago
javascript intermediate
A Promise represents an asynchronous operation's eventual result — .then()/.catch()/.finally() chain handlers without nesting callbacks.
2mo ago
javascript intermediate
Prototypal Inheritance ES5
JavaScript objects inherit from other objects via a prototype chain — class syntax is syntactic sugar over this mechanism.
2mo ago
javascript intermediate
Prototype Pollution ES5
An attacker injects properties into JavaScript's Object.prototype, affecting all objects in the application.
CWE-1321 OWASP A3:2021
2mo ago
security advanced
8.1
Proxy & Reflect API ES2015
Proxy wraps an object and intercepts fundamental operations (get, set, delete) via handler traps — Reflect provides the default implementations of those operations.
2mo ago
javascript advanced