JavaScript

History API (pushState)

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

History API e ndryshon adresën në shfletues pa e ringarkuar faqen (history.pushState), dhe të njofton kur përdoruesi shtyp „Prapa“ (popstate). Kështu punojnë SPA-të — përfshirë këtë fjalor.

EnglishEN

The History API changes the browser's address without reloading the page (history.pushState), and tells you when the user presses “Back” (popstate). That's how SPAs work — including this glossary.

Si ta mendosh

Si ta kthesh faqen e librit pa e mbyllur dhe hapur librin sërish.

Lexoje në anglisht

Like turning the page without closing and reopening the book.

Shembull kodijavascript

history.pushState(null, "", "/term/api");
window.addEventListener("popstate", () => shfaq(location.pathname));

Terma të lidhur