Hello, I find hyperscript very convenient to produce HTML code. It might be easier to write custom controls' renderers in this manner.
For example, something like this:
return r('div.profile', { id: control }, [
r('img', { src: control.getPictureUrl() }),
r('div.name', control.getName())
])
Instead of
rm
.write('<div')
.writeControlData(control)
.addClass('profile')
.writeClasses()
.write('>')
.write('<img'
.writeAttribute('src', control.getPictureUrl())
.write('/>')
.write('<div class="name">')
.writeEscaped(control.getName())
.write('</div>')
.write('</div>')
I'd like to suggest evaluate the idea and consider its implementation.
Will it be suitable for OpenUI5 codebase?
Hi @yaruson,
Thanks for the ticket.
Internal ticket 1670521190 with your request has been opened for this.
Hi,
We are working on improving the API of RenderManager.
Jordan
Hi again,
We have introduced a new rendering API that is semantic in a way that it works quite like hyperscript. We will roll it out soon but it's basically there under the hood and can be used.
I am closing this issue now and stay tuned for details.
Best regards,
Jordan
Most helpful comment
Hi,
We are working on improving the API of RenderManager.
Jordan