Skip to content

Instantly share code, notes, and snippets.

View anoop0567's full-sized avatar
🎯
Focusing

Anoop Chauhan anoop0567

🎯
Focusing
View GitHub Profile
import { Directive, ElementRef } from '@angular/core';
@Directive({ selector: 'img' })
export class LazyImgDirective {
constructor({ nativeElement }: ElementRef<HTMLImageElement>) {
const supports = 'loading' in HTMLImageElement.prototype;
if (supports) {
nativeElement.setAttribute('loading', 'lazy');
}
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active May 3, 2024 12:56
Online Resources For Web Developers (No Downloading)
@faressoft
faressoft / dom_performance_reflow_repaint.md
Last active May 6, 2024 06:11
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.
@matthewzring
matthewzring / markdown-text-101.md
Last active May 9, 2024 12:58
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 8, 2024 18:53
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub