All Projects → calvellido → focus-options-polyfill

calvellido / focus-options-polyfill

Licence: MIT license
JavaScript polyfill for the WHATWG spec of focusOptions, that enables a set of options to be passed to the focus method

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to focus-options-polyfill

Webxr Polyfill
Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Stars: ✭ 251 (+445.65%)
Mutual labels:  polyfill
vue-focus-loop
Vue component that helps you to to trap focus in an element.
Stars: ✭ 23 (-50%)
Mutual labels:  focus
react-tv-navigation
React Navigation for TVs
Stars: ✭ 64 (+39.13%)
Mutual labels:  focus
Adapter
Shim to insulate apps from spec changes and prefix differences. Latest adapter.js release:
Stars: ✭ 3,002 (+6426.09%)
Mutual labels:  polyfill
polyfill-useragent-normaliser
No description or website provided.
Stars: ✭ 23 (-50%)
Mutual labels:  polyfill
create-require
Polyfill for Node.js module.createRequire (<= v12.2.0)
Stars: ✭ 24 (-47.83%)
Mutual labels:  polyfill
Eslint Plugin Compat
Lint the browser compatibility of your code
Stars: ✭ 2,743 (+5863.04%)
Mutual labels:  polyfill
scoper
A polyfill for scoped HTML styles elements
Stars: ✭ 79 (+71.74%)
Mutual labels:  polyfill
minicrawler
Multiplexing web client supporting HTTP/2 and WHATWG URL compliant parser written in C
Stars: ✭ 21 (-54.35%)
Mutual labels:  whatwg
Optino
Fully collateralised vanilla and bounded (capped call and floored put) crypto options
Stars: ✭ 16 (-65.22%)
Mutual labels:  options
python-api
Trading API for Quedex Bitcoin Derivatives Exchange.
Stars: ✭ 20 (-56.52%)
Mutual labels:  options
mimesniff
MIME Sniffing Standard
Stars: ✭ 89 (+93.48%)
Mutual labels:  whatwg
es6-proxy-polyfill
ES6 Proxy polyfill, supports IE8+, Node.js, etc.
Stars: ✭ 49 (+6.52%)
Mutual labels:  polyfill
Pressure
👇💥 JavaScript library for handling Force Touch, 3D Touch, and Pointer Pressure.
Stars: ✭ 2,785 (+5954.35%)
Mutual labels:  polyfill
barcode-detector
Spec compliant polyfill of the Barcode Detection API 🤳
Stars: ✭ 31 (-32.61%)
Mutual labels:  polyfill
Poly Flif
📷 A poly-fill for the FLIF image format.
Stars: ✭ 243 (+428.26%)
Mutual labels:  polyfill
NSE-Stock-Scanner
National Stock Exchange (NSE), India based Stock screener program. Supports Live Data, Swing / Momentum Trading, Intraday Trading, Connect to online brokers as Zerodha Kite, Risk Management, Emotion Control, Screening, Strategies, Backtesting, Automatic Stock Downloading after closing, live free day trading data and much more
Stars: ✭ 78 (+69.57%)
Mutual labels:  options
rainmood
一个简单项目,只有一个页面。循环播放十首电影原声精选,背景乐为下雨声。
Stars: ✭ 12 (-73.91%)
Mutual labels:  focus
SimpleConfig
No description or website provided.
Stars: ✭ 22 (-52.17%)
Mutual labels:  options
react-native-polyfill-globals
Polyfills and patches missing or partially supported web and core APIs.
Stars: ✭ 20 (-56.52%)
Mutual labels:  polyfill

focus-options-polyfill

npm version

JavaScript polyfill for focusOptions, an optional property passed to HTMLElement.focus() that contains the preventScroll boolean, which controls whether the browser should prevent a focused element from being scrolled into view.

Current support

https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option

Docs

Intents to implement

document.scrollingElement

This polyfill uses a basic fallback for the document.scrollingElement property, using document.documentElement when not found.

This could suffice in basic cases, but if you need wider and/or specific support you should refer to a polyfill for it:

Also, to overcome its absence if you are executing this polyfill through jsdom, you could place this in your setup:

document.scrollingElement = document.documentElement

More context about this property can be found in:

Dev and testing

To check this polyfill you can do:

npm run dev

to launch a small page that will check browser/polyfill behaviour.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].