Customize tags with inner html
See original GitHub issueFor example, https://ant.design/components/popconfirm/
// confirm, cancel are functions
<Popconfirm title="Are you sure delete this task?" onConfirm={confirm} onCancel={cancel} okText="Yes" cancelText="No">
<a href="#">Delete</a>
</Popconfirm>
What I expect:
class Popconfirm(title: String, okText: String, cancelText: String, onConfirm: Event => Unit, onCancel: Event => Unit) extend SomeTrait {
@some_anno override def render(body: Element): Element = ???
}
here render
is the function used in macros.
But this test case(https://github.com/ThoughtWorksInc/Binding.scala/blob/11.0.x/fxml/.js/src/test/scala/com/thoughtworks/binding/DateSpec.scala) shows that <Date></Date>
is Binding[Date]
or another type relating to Date
. It seems @fxml
is not suitable for customizing tags to create something like Ant Design.
In https://github.com/ThoughtWorksInc/Binding.scala/issues/4#issuecomment-273739769 ,
there are tricks to make custom tags work, but it is without any inner html (eg. <a href="#">Delete</a>
).
Issue Analytics
- State:
- Created 7 years ago
- Comments:12
Top Results From Across the Web
innerHTML is not working for some tags like button or custom ...
Closed 4 years ago. Problem in interpolation when I assign some html tags(like button) or custom tag by angular interpolation then its not ......
Read more >Element.innerHTML - Web APIs | MDN
The innerHTML property can be used to examine the current HTML source of the page, including any changes that have been made since...
Read more >HTML DOM Element innerHTML Property - W3Schools
The innerHTML property returns: The text content of the element, including all spacing and inner HTML tags. The innerText property returns: Just the...
Read more >JavaScript innerHTML
Summary: in this tutorial, you will learn how to use the JavaScript innerHTML property of an element to get or set an HTML...
Read more >innerHTML and compatibility - Xul.fr
innerHTML is a property of any HTML element which has for value the content that is between the opening tag and ending tag....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please, show the body (with return type) of popconfirm
I’m trying to implement the inner html feature in https://github.com/sadhen/Binding-SemanticUI