Giter Club home page Giter Club logo

lazyfill's Introduction

๐Ÿ’Š lazyfill

Polyfill Service - the lazy way

Polyfills are loaded on demand, only when they are needed ๐Ÿ˜ฒ
Initial 3Kb to polyfill a lot of Stuff!

Ussage

Add this script on the top of your page:

<script src="https://cdn.jsdelivr.net/gh/nuxodin/[email protected]/mod.min.js"></script>

done!

Polyfills

(Anything missing? Any suggestions?)

  • Window
    • cookieStore
    • fetch
    • Promise
    • IntersectionObserver
    • ResizeObserver
    • AbortController
    • URLSearchParams
    • Temporal
    • temporal
    • customElements
    • structuredClone
    • URLPattern
    • ReadableStream
    • Sanitizer
    • requestIdleCallback
    • cancelIdleCallback
    • WeakSet
  • Element
    • setHTML
    • matches
    • closest
    • prepend
    • append
    • before
    • after
    • replaceWidth
    • remove
    • blur
    • focus
    • classList
    • getElementsByClassName
    • children
    • toggleAttribute
    • isVisible
    • scrollIntoViewIfNeeded
  • TypedArray
    • toReversed
    • toSorted
    • with
  • Array
    • toReversed
    • toSorted
    • with
    • toSpliced
    • from
    • of
    • at
    • copyWithin
    • entries
    • fill
    • find
    • findIndex
    • findLast
    • findLastIndex
    • flat
    • flatMap
    • includes
    • keys
    • values
  • Intl.DateTimeFormat
    • formatToParts
  • Intl
    • DisplayNames
    • ListFormat
    • Locale
    • PluralRules
    • RelativeTimeFormat
    • getCanonicalLocales
  • CSS
    • escape
    • registerProperty
    • supports
  • HTMLDocument
    • currentScript
    • caretRangeFromPoint
  • Node
    • contains
    • isConnected
  • HTMLElement
    • inert
  • HTMLFormElement
    • reportValidity
    • requestSubmit
  • HTMLInputElement
    • reportValidity
  • HTMLSlotElement
    • assignedElements
  • Math
    • trunc
    • sign
  • Navigator
    • share
  • Number
    • isInteger
  • Object
    • assign
    • entries
    • fromEntries
    • is
    • values
    • hasOwn
  • Promise
    • allSettled
    • any
    • withResolvers
  • RegExp
    • flags
  • String
    • fromCodePoint
    • at
    • codePointAt
    • endsWith
    • includes
    • padEnd
    • padStart
    • repeat
    • startsWith
    • replaceAll
  • SubmitEvent
    • submitter
  • SVGStyleElement
    • sheet
  • Crypto
    • randomUUID
  • addEventListener signal options
  • focus options
  • classList force toggle
  • Element.contains(TextNode) bug

How it works

To every polyfillable property, the scripts adds a getter which synchronously loads the corresponding polyfill.
Of course, we all know that blocking xhr-requests is not nice.
Therefore, the url to the script that should be added to the page is given in the console. Ideal for prototyping.

Let's assume that your browser does not support the function "String.prototype.at".

> ['a','b','c'].at(-1); // accessing  [].at immediately loads the polyfill
> 'c'

Help

Any help is greatly appreciated.

Thanks / Resources

https://github.com/es-shims

https://github.com/behnammodi/polyfill

https://polyfill.io/v3/

https://ungap.github.io/

https://github.com/Sylvain59650/all-polyfills

https://vanillajstoolkit.com/polyfills/

lazyfill's People

Contributors

nuxodin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.