Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title: Proposal: Add Section on "Web APIs" to Learn JavaScript #212

Closed
srishti-coder opened this issue Jul 2, 2024 · 4 comments
Closed
Assignees

Comments

@srishti-coder
Copy link
Contributor

Proposal to Add a New Section on "Web APIs"

Summary:
I propose to add a new section titled "Web APIs" to the Learn JavaScript project. This section will cover various Web APIs that are essential for modern JavaScript development.

Outline:

  1. Introduction to Web APIs
  2. DOM Manipulation
  3. Fetch API
  4. Geolocation API
  5. Canvas API
  6. Storage API
  7. Notification API
  8. Example Code:
    • Simple fetch request
    • Drawing shapes on Canvas
    • Getting user location
    • Storing data in localStorage

Code Example

// Example of Fetch API
fetch('https://api.example.com/data')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

// Example of Canvas API
const canvas = document.getElementById('myCanvas');
const ctx = canvas.getContext('2d');
ctx.fillStyle = '#FF0000';
ctx.fillRect(0, 0, 150, 75);

Benefits:

Provides practical examples of using Web APIs.
Enhances learners' understanding of how to interact with the browser and web server.
Makes the curriculum more comprehensive and up-to-date with current JavaScript practices.

I look forward to discussing this proposal further and am open to suggestions or feedback. Thank you for considering my contribution.

@sumn2u
Copy link
Owner

sumn2u commented Jul 2, 2024

@srishti-coder It's a great proposal. I can see the benefits. Would it be okay if we include examples in their respective sections?

@srishti-coder
Copy link
Contributor Author

srishti-coder commented Jul 2, 2024

@sumn2u Thanks for the approval. Each section will have examples.

@sumn2u
Copy link
Owner

sumn2u commented Jul 2, 2024

@sumn2u Thanks for the approval. Each section will have examples.

I've assigned you this task, but please let me know if you have any questions or if anything is unclear.

@srishti-coder
Copy link
Contributor Author

Thank you @sumn2u . I will let you know when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants