Closed glmars closed 3 years ago
I think the efforts of custom components can be split into a separate repository. I had a try in https://github.com/ThoughtWorksInc/dom.scala/
You may want to fork https://github.com/ThoughtWorksInc/dom.scala and hack on it
Unfortunately, your experiment (https://github.com/ThoughtWorksInc/dom.scala/commit/083f8c330e497002de4b03e00c87e9657e4d6e7b#diff-5f9d51a26102bb299d4706844f7678c4R619) breaks mine :smile:
Never mind. Both implementation are experiments. I think you can even create a brand new annotation. I imagined an @html annotation in https://www.reddit.com/r/scala/comments/5oo6x0/desktop_gui_and_custom_tags_in_bindingscala/?ref=share&ref_source=link , which is more intuitive than current @dom annotation.
Leonid Turnaev notifications@github.com 于2018年12月17日周一 下午7:25写道:
Unfortunately, your experiment (ThoughtWorksInc/dom.scala@083f8c3
diff-5f9d51a26102bb299d4706844f7678c4R619
https://github.com/ThoughtWorksInc/dom.scala/commit/083f8c330e497002de4b03e00c87e9657e4d6e7b#diff-5f9d51a26102bb299d4706844f7678c4R619) breaks mine 😄
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ThoughtWorksInc/Binding.scala/pull/132#issuecomment-447812645, or mute the thread https://github.com/notifications/unsubscribe-auth/AAktuv5yShyAT2lPU8TNwqsbssgqEysKks5u539EgaJpZM4ZV25r .
-- 杨博 (Yang Bo)
I think this issue has been solved in the Name based XML proposal. html.scala is implemented based on the Name based XML.
It's early early early preview of dom component feature (please, see discussion in https://github.com/ThoughtWorksInc/Binding.scala/issues/128).
The main idea is introducing special syntax to extract peace of a
@dom
powered code as the separate reusable elements. I'm called it - "dom components".Which can be used in @dom functions:
It generates such DOM tree:
:exclamation:Hardcode:exclamation: - only
dialog
tag is considered as a dom component in this preview/cc @sadhen, @ccamel, @jfilali, @skaz1970, @maxkorolev, @csoren