awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
mdn avatar

mdn/dom-examples

0
View on GitHub↗
4,005 stars·1,920 forks·JavaScript·CC0-1.0·15 viewsdeveloper.mozilla.org/en-US/docs/Web/API↗

Dom Examples

This project is a comprehensive reference library of runnable code samples and implementation guides for Web APIs, CSS features, and modular web components. It provides a collection of live demonstrations illustrating how to implement browser APIs and programmatic DOM manipulation.

The repository includes specialized demonstrations for interacting with device hardware, such as sensors, Bluetooth, USB, and foldable screen posture detection. It also features implementation guides for modern styling capabilities, including advanced layout patterns, custom functions, and painting APIs, alongside a reference for building reusable custom elements using shadow DOM structures.

The library covers a broad range of capabilities, including GPU-accelerated graphics rendering, asynchronous network communication, and media playback control. It provides examples for user interaction systems like drag-and-drop and input event tracking, as well as security implementations for authentication and encrypted credentials. Additional coverage includes window management for picture-in-picture documents and data persistence via local storage.

Features

  • API Reference Demos - Serves as a comprehensive reference library of interactive samples demonstrating how to implement various Web APIs.
  • DOM Manipulation - Provides a comprehensive set of examples for programmatically updating the document object model.
  • Web Hardware APIs - Connects browser scripts to physical hardware using standardized APIs for Bluetooth, USB, and sensors.
  • Message Channel Ports - Shows how to create pairs of ports for secure messaging between pages and iframes.
  • DOM Manipulators - Provides practical JavaScript snippets for programmatically modifying the structure and content of the browser DOM.
  • Drag State Monitors - Provides event-driven monitoring of when items move, enter, leave, or drop on targets during drag operations.
  • Drag and Drop Interfaces - Implements a comprehensive system for selecting and moving elements to designated target elements via drag-and-drop.
  • Drop Target Configuration - Implements the capability to configure specific elements to accept dragged items by intercepting drag-over events.
  • Asynchronous Resource Fetching - Demonstrates requesting data from servers asynchronously to update page content without reloading.
  • Shadow DOM Encapsulation - Illustrates how to use shadow DOM to create reusable custom elements with isolated styles.
  • Cross-Context Communication - Implements mechanisms for exchanging data and coordinating tasks between different browser script execution contexts.
  • Web Components - Provides a detailed reference and code samples for building reusable custom elements using shadow DOM structures.
  • Advanced CSS Styling - Provides implementation guides and runnable examples for advanced CSS layout patterns, custom functions, and painting APIs.
  • Media Capture and Playback - Implements systems for capturing and managing audio and video streams directly from the browser.
  • GPU Accelerated Rendering - Utilizes GPU acceleration to render high-performance 2D and 3D visuals via the canvas API.
  • Real-Time Pixel Manipulation - Demonstrates manipulating raw pixel data from live video streams using a canvas for real-time effects.
  • Device Posture Detection - Provides demonstrations for detecting foldable screen postures to create adaptive layouts.
  • Browser Sensor Monitoring - Implements hooks for tracking real-time data from browser-accessible sensors like accelerometers and gyroscopes.
  • Web Hardware Interfaces - Provides implementation guides for communicating with Bluetooth, USB, and NFC devices via the browser.
  • Security and Access Control - Implements security patterns for user authentication, encrypted credentials, and the use of trusted types to prevent injection.
  • Application Performance Optimization - Includes examples for profiling execution speed and scheduling background tasks to optimize application responsiveness.
  • JavaScript Worker Threads - Implements JavaScript worker threads to move heavy computations off the main user interface thread.
  • Always-on-Top Browser Windows - Implements browser windows that remain visible above other tabs or applications for persistent content display.
  • Color Value Calculations - Provides custom CSS functions to calculate semi-transparent, lighter, or darker versions of colors.
  • CSS Custom Functions - Implements custom CSS functions to calculate typed units and synchronize property values across elements.
  • CSS Progress Indicators - Demonstrates visual representations of completion status using native CSS progress functions.
  • CSS Value Synchronization - Implements a method to synchronize multiple CSS properties from a shared value across different viewport sizes.
  • Event-Driven User Interactions - Demonstrates linking browser interface events to application logic for immediate state updates.
  • Gradient Functions - Implements reusable CSS functions to encapsulate complex background gradient logic for consistent application.
  • Input Event Tracking - Implements a system to monitor pointer events, touch gestures, keyboard input, and gamepad state.
  • Non-Primary Mouse Click Handling - Provides a system to detect and handle interactions from non-primary pointing device buttons.
  • Document Detachment - Provides a feature to display an arbitrary HTML document in a floating, always-on-top window.
  • Picture-in-Picture Styling - Implements specific CSS rules applied to elements when they are displayed within a picture-in-picture floating window.
  • Programmatic Background Image Generation - Implements a worklet-based system to generate complex background images that respond to computed style changes.
  • Hardware Integration Samples - Offers a comprehensive set of educational samples for integrating various device hardware components through web interfaces.
  • Progress Ratio Computations - Provides a method for calculating normalized values between thresholds to drive UI animations and layout changes.
  • JavaScript Media Query Evaluation - Provides examples of executing media query checks within JavaScript to trigger conditional logic based on device characteristics.
  • Responsive Layout Styling - Provides examples of assigning different CSS values for narrow and wide layouts to handle conditional styling.
  • Text Highlighting - Demonstrates a system for rendering custom background highlights on text using CSS properties.
  • Background Processing Workers - Provides utilities for offloading intensive tasks to background workers to maintain UI responsiveness.
  • CSS Property Support Testers - Implements mechanisms to evaluate browser support for specific CSS properties using native rules and JavaScript.
  • Typed CSS Arithmetic - Provides a system for performing arithmetic operations on typed CSS units and unitless numbers.
  • Browser Interaction Controls - Provides a mechanism to block standard browser behaviors, such as link opening, during non-primary mouse interactions.

Star history

Star history chart for mdn/dom-examplesStar history chart for mdn/dom-examples

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Dom Examples

These projects share indexed features with Dom Examples. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • javascript-tutorial/ru.javascript.infojavascript-tutorial avatar

    javascript-tutorial/ru.javascript.info

    4,057View on GitHub↗

    This project is a comprehensive JavaScript programming tutorial and frontend web development curriculum. It serves as a structured educational resource for learning the JavaScript language, ranging from basic syntax to advanced asynchronous patterns and modern programming techniques. The resource functions as a frontend engineering textbook and CSS layout guide, providing detailed instructional material on building responsive user interfaces. It covers the design of custom web components and the application of styles and positioning to create effective frontend interfaces. The curriculum enc

    HTMLjavascriptrussiantutorial
    View on GitHub↗4,057
  • bradtraversy/vanillawebprojectsbradtraversy avatar

    bradtraversy/vanillawebprojects

    16,097View on GitHub↗

    This project is a collection of reference implementations for vanilla web applications, interactive browser games, and core frontend development patterns. It consists of small web applications and tools built using standard HTML, CSS, and JavaScript without the use of external frameworks or libraries. The collection demonstrates various practical implementations, including browser-based mini games with arcade and word-guessing mechanics, as well as frontend interface prototypes. These examples cover the use of the native document object model for state manipulation and the implementation of i

    JavaScript
    View on GitHub↗16,097
  • wicg/webcomponentsWICG avatar

    WICG/webcomponents

    4,494View on GitHub↗

    Web Components is a set of specifications for creating reusable custom elements with encapsulated styling and logic for the web. It provides a standard for defining new HTML tags that function as independent components across different browser engines. The system is built on three primary pillars: the Custom Elements standard for defining new tags, the Shadow DOM implementation for isolating internal document structures and styles, and the HTML Templates specification for defining reusable fragments of markup that remain inert until instantiated. These capabilities enable modular web design

    HTML
    View on GitHub↗4,494
  • javascript-tutorial/en.javascript.infojavascript-tutorial avatar

    javascript-tutorial/en.javascript.info

    25,344View on GitHub↗

    This project is a comprehensive JavaScript programming tutorial and language reference. It serves as a web development education resource providing instruction on modern language fundamentals, object-oriented design, and advanced asynchronous programming patterns. The resource functions as both a frontend development guide and a technical reference. It covers core language features such as closures, prototypes, promises, and typed arrays, while providing practical lessons on managing browser data and handling network requests. The content spans several key capability areas, including browser

    HTMLenglishjavascripttutorial
    View on GitHub↗25,344
Compare all 30 related projects→

Frequently asked questions

What does mdn/dom-examples do?

This project is a comprehensive reference library of runnable code samples and implementation guides for Web APIs, CSS features, and modular web components. It provides a collection of live demonstrations illustrating how to implement browser APIs and programmatic DOM manipulation.

What are the main features of mdn/dom-examples?

The main features of mdn/dom-examples are: API Reference Demos, DOM Manipulation, Web Hardware APIs, Message Channel Ports, DOM Manipulators, Drag State Monitors, Drag and Drop Interfaces, Drop Target Configuration.

Which projects share features with mdn/dom-examples?

Projects with overlapping indexed features include: javascript-tutorial/ru.javascript.info — This project is a comprehensive JavaScript programming tutorial and frontend web development curriculum. It serves as… wicg/webcomponents — Web Components is a set of specifications for creating reusable custom elements with encapsulated styling and logic… bradtraversy/vanillawebprojects — This project is a collection of reference implementations for vanilla web applications, interactive browser games, and… javascript-tutorial/en.javascript.info — This project is a comprehensive JavaScript programming tutorial and language reference. It serves as a web development… gustavoguanabara/javascript — This project is a structured JavaScript programming course and learning path designed for beginners. It functions as… john-smilga/javascript-basic-projects — This is a collection of small JavaScript projects and code samples that demonstrate the implementation of fundamental…