GitShow/developit/simple-element-resize-detector
developit

simple-element-resize-detector

Observes element size changes using a hidden iframe

by developit
domdom-mutation-observersdom-utilitieselement-resizesobserves-resizing
Star on GitHubForknpm

JavaScript

189 stars4 forks4 contributorsQuiet · 7y agoSince 20171.3.0

Meet the team

See all 4 on GitHub →
developit
developit18 contributions
NekR
NekR6 contributions
bfred-it
bfred-it1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

1 of 6 standards met

Community profile →
28
✓README○License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 3 discussions · Last activity 7y ago
See all on GitHub →
qingxiang-jia
Resize detection only works in Chrome nowOpenIssue

I understand that at this point, this project seems to be no longer maintained. But I just want to point out, the code seems only work in Chrome (8/2019), which makes it a bit pointless because Chrome natively supports ResizeObserver. Firefox 68 and Edge (the non-chromium one) currently doesn't support ResizeObserver and this workaround also doesn't work with the two browsers. Here is my code in case I used in incorrectly:

qingxiang-jia · 6y ago
luwes
Resize events only work if iframe in viewportOpenIssue

The solution of and does not keep the iframe positioned in a viewable area at all times. If the target element is nested in an element with and the target element has a negative top margin or a negative absolute positioned top the resize events stop working. seems to fix the issue but I'm not sure what all the consequences are.

luwes · 7y ago

Recent fixes

View closed PRs →
NekR
Fix Firefox visiblity issueMergedPR

Fixes #6. I use this solution in production.

NekR · 7y ago
jcubic
Don't work in firefoxClosedIssue

It don't work in Firefox, the event is not fired when there is . If you remove it it's fired.

jcubic · 7y ago
luwes
Fix type errorMergedPR

This change fixes a type error which would happen on some browsers where wouldn't be defined immediately. Fixes #9

luwes · 7y ago
Structured data for AI agents

Repository: developit/simple-element-resize-detector. Description: Observes element size changes using a hidden iframe Stars: 189, Forks: 4. Primary language: JavaScript. Languages: JavaScript (100%). Topics: dom, dom-mutation-observers, dom-utilities, element-resizes, observes-resizing. Latest release: 1.3.0 (7y ago). Open PRs: 0, open issues: 3. Last activity: 7y ago. Community health: 28%. Top contributors: developit, NekR, bfred-it.

·@ofershap

Replace github.com with gitshow.dev