Skip to content

replace isConnected with parentDom.contains#4421

Merged
JoviDeCroock merged 2 commits intomainfrom
use-contains
Jun 25, 2024
Merged

replace isConnected with parentDom.contains#4421
JoviDeCroock merged 2 commits intomainfrom
use-contains

Conversation

@JoviDeCroock
Copy link
Copy Markdown
Member

@JoviDeCroock JoviDeCroock commented Jun 24, 2024

Fixes #4415

#4194 still works correctly and this solves the IE11 not having isConected

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 24, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +2% (-8.45ms - +15.30ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -2% - +2% (-0.25ms - +0.30ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +2% (-1.74ms - +1.80ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +5% (-0.35ms - +0.79ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +4% (-0.64ms - +3.30ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +2% (-0.09ms - +0.04ms)
    preact-local vs preact-main
  • todo: slower ❌ 0% - 2% (0.08ms - 0.51ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -5% - +0% (-1.53ms - +0.14ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.02ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -4% - +0% (-0.48ms - +0.00ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +0% (-0.02ms - +0.01ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local880.70ms - 898.72ms-unsure 🔍
-1% - +2%
-8.45ms - +15.30ms
preact-main878.56ms - 894.01msunsure 🔍
-2% - +1%
-15.30ms - +8.45ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local25.15ms - 25.17ms-unsure 🔍
-0% - +0%
-0.00ms - +0.02ms
preact-main25.15ms - 25.15msunsure 🔍
-0% - +0%
-0.02ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.63ms - 16.99ms-unsure 🔍
-2% - +2%
-0.25ms - +0.30ms
preact-main16.58ms - 17.00msunsure 🔍
-2% - +2%
-0.30ms - +0.25ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.69ms - 1.69ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.69ms - 1.69msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local75.15ms - 77.50ms-unsure 🔍
-2% - +2%
-1.74ms - +1.80ms
preact-main74.97ms - 77.62msunsure 🔍
-2% - +2%
-1.80ms - +1.74ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local13.11ms - 13.31ms-unsure 🔍
-4% - +0%
-0.48ms - +0.00ms
preact-main13.22ms - 13.67msunsure 🔍
-0% - +4%
-0.00ms - +0.48ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.80ms - 17.63ms-unsure 🔍
-2% - +5%
-0.35ms - +0.79ms
preact-main16.61ms - 17.38msunsure 🔍
-5% - +2%
-0.79ms - +0.35ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.61ms - 4.62ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main4.61ms - 4.62msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local80.41ms - 83.08ms-unsure 🔍
-1% - +4%
-0.64ms - +3.30ms
preact-main78.97ms - 81.87msunsure 🔍
-4% - +1%
-3.30ms - +0.64ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.56ms - 3.59ms-unsure 🔍
-1% - +0%
-0.02ms - +0.01ms
preact-main3.57ms - 3.60msunsure 🔍
-0% - +1%
-0.01ms - +0.02ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local29.71ms - 30.47ms-unsure 🔍
-3% - +1%
-0.80ms - +0.39ms
preact-main29.84ms - 30.75msunsure 🔍
-1% - +3%
-0.39ms - +0.80ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local35.68ms - 37.68ms-unsure 🔍
-3% - +4%
-1.21ms - +1.51ms
preact-main35.60ms - 37.45msunsure 🔍
-4% - +3%
-1.51ms - +1.21ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local26.76ms - 27.45ms-unsure 🔍
-2% - +2%
-0.53ms - +0.42ms
preact-main26.83ms - 27.49msunsure 🔍
-2% - +2%
-0.42ms - +0.53ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local31.91ms - 33.89ms-unsure 🔍
-1% - +7%
-0.41ms - +2.21ms
preact-main31.14ms - 32.86msunsure 🔍
-7% - +1%
-2.21ms - +0.41ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local22.97ms - 24.49ms-unsure 🔍
-9% - +1%
-2.17ms - +0.34ms
preact-main23.65ms - 25.65msunsure 🔍
-2% - +9%
-0.34ms - +2.17ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local25.24ms - 26.49ms-unsure 🔍
-2% - +6%
-0.40ms - +1.41ms
preact-main24.71ms - 26.01msunsure 🔍
-5% - +2%
-1.41ms - +0.40ms
-
text-update

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.97ms - 2.06ms-unsure 🔍
-4% - +2%
-0.09ms - +0.04ms
preact-main1.99ms - 2.08msunsure 🔍
-2% - +4%
-0.04ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.98ms - 0.98ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main0.98ms - 0.98msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local27.37ms - 27.68ms-slower ❌
0% - 2%
0.08ms - 0.51ms
preact-main27.08ms - 27.38msfaster ✔
0% - 2%
0.08ms - 0.51ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.25ms - 1.25ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main1.25ms - 1.25msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local31.13ms - 31.96ms-unsure 🔍
-5% - +0%
-1.53ms - +0.14ms
preact-main31.52ms - 32.97msunsure 🔍
-0% - +5%
-0.14ms - +1.53ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.55ms - 3.55ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main3.55ms - 3.55msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 24, 2024

Size Change: +30 B (+0.05%)

Total Size: 61.8 kB

Filename Size Change
compat/dist/compat.js 4.1 kB +11 B (+0.27%)
compat/dist/compat.module.js 4.03 kB +11 B (+0.27%)
compat/dist/compat.umd.js 4.17 kB +15 B (+0.36%)
dist/preact.js 4.67 kB -1 B (-0.02%)
dist/preact.min.js 4.7 kB -2 B (-0.04%)
dist/preact.min.umd.js 4.73 kB -3 B (-0.06%)
dist/preact.umd.js 4.75 kB -1 B (-0.02%)
ℹ️ View Unchanged
Filename Size
debug/dist/debug.js 3.7 kB
debug/dist/debug.module.js 3.71 kB
debug/dist/debug.umd.js 3.78 kB
devtools/dist/devtools.js 259 B
devtools/dist/devtools.module.js 273 B
devtools/dist/devtools.umd.js 345 B
dist/preact.min.module.js 4.7 kB
dist/preact.module.js 4.7 kB
hooks/dist/hooks.js 1.56 kB
hooks/dist/hooks.module.js 1.59 kB
hooks/dist/hooks.umd.js 1.63 kB
jsx-runtime/dist/jsxRuntime.js 981 B
jsx-runtime/dist/jsxRuntime.module.js 956 B
jsx-runtime/dist/jsxRuntime.umd.js 1.06 kB
test-utils/dist/testUtils.js 451 B
test-utils/dist/testUtils.module.js 456 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@JoviDeCroock JoviDeCroock marked this pull request as ready for review June 24, 2024 14:06
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 99.611%. remained the same
when pulling 4d2ac43 on use-contains
into 4c20c23 on main.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 99.611%. remained the same
when pulling 4d2ac43 on use-contains
into 4c20c23 on main.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 99.611%. remained the same
when pulling cc839df on use-contains
into 92e86e9 on main.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 99.611%. remained the same
when pulling cc839df on use-contains
into 92e86e9 on main.

@towry
Copy link
Copy Markdown

towry commented Aug 15, 2024

This commit breaks things.

TypeError: n2.contains is not a function

according to this information: netzo/dsa@dcc0bb4

10.22.0 works.

@marvinhagemeister
Copy link
Copy Markdown
Member

@towry Using .contains() is a standard DOM API that's been around for ages. Fresh 1.x hasn't been updated yet. The issue you're looking for is denoland/fresh#2587

@marvinhagemeister
Copy link
Copy Markdown
Member

@towry I've just cut a new Fresh release. Please upgrade to Fresh 1.7.1 which resolves this issue in your project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

preact@10.20.2 application is broken on old user agents

4 participants