Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Feat/support event transform #496

Merged
merged 10 commits into from
Sep 5, 2022
Merged

Conversation

answershuto
Copy link
Member

close #483

Rax 是直接通过将值 addEventListener 来监听事件,所以是 follow web 标准的,React 通过自身实现的一套合成事件来处理事件,导致了一些上层 DSL 的差异性。
例如:

  • 在 rax 中,例如 ontouchstart 等非驼峰事件可以工作,但是 react 中会有白名单做校验,需要写 onTouchStart 等驼峰命名才可以正常工作。
  • react 中,web 标准中的 dblclick 事件被改写成了 onDoubleClick。如果 Rax DSL 需要在 React runtime 中工作,需要抹平这些差异,将 ondblclick 转换成 onDoubleClick。

@vercel
Copy link

vercel bot commented Sep 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ice-v3 ✅ Ready (Inspect) Visit Preview Sep 5, 2022 at 9:03AM (UTC)

@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2022

Codecov Report

Base: 82.12% // Head: 82.45% // Increases project coverage by +0.33% 🎉

Coverage data is based on head (21d8854) compared to base (5d10f02).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-next     #496      +/-   ##
================================================
+ Coverage         82.12%   82.45%   +0.33%     
================================================
  Files                90       92       +2     
  Lines              7669     7816     +147     
  Branches            971      979       +8     
================================================
+ Hits               6298     6445     +147     
+ Misses             1364     1363       -1     
- Partials              7        8       +1     
Impacted Files Coverage Δ
packages/rax-compat/src/create-element.ts 89.88% <100.00%> (+0.17%) ⬆️
packages/rax-compat/src/events.ts 100.00% <100.00%> (ø)
packages/rax-compat/src/prototypes.ts 100.00% <100.00%> (ø)
packages/ice/src/service/config.ts 86.66% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

wssgcg1213
wssgcg1213 previously approved these changes Sep 5, 2022
wssgcg1213
wssgcg1213 previously approved these changes Sep 5, 2022
@answershuto answershuto merged commit 1cf3800 into release-next Sep 5, 2022
@answershuto answershuto deleted the feat/support_event_transform branch September 5, 2022 09:25
@ClarkXia ClarkXia mentioned this pull request Sep 16, 2022
14 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants