MCA
WEB APIS // MASTER THE CONCEPTS // WRITE BRUTAL CODE // WEB APIS // MASTER THE CONCEPTS // WRITE BRUTAL CODE //
BACK TO SYLLABUS
MEDIUM

WEB APIS

LocalStorage, Fetch, Geolocation, and more

CONCEPTS

01Web Storage API (localStorage, sessionStorage)
02History API
03Geolocation API
04Canvas API
05Intersection Observer
06WebSockets

SYNTAX_DEMO

Interacting with the browser
// Local Storage
localStorage.setItem('theme', 'dark');
const theme = localStorage.getItem('theme');

// Intersection Observer
const observer = new IntersectionObserver((entries) => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      console.log('Element is visible!');
      observer.unobserve(entry.target);
    }
  });
});

observer.observe(document.querySelector('.animate-me'));