[Ur] Patch, more html5 attributes
Sergey Mironov
grrwlf at gmail.com
Sun Oct 12 07:58:28 EDT 2014
Hi!
I have ported one more Bootstrap3 [1] example to the Ur/Web. This time, it was
much easier job to do, but still I had to patch the compiler to make it work.
First thing I need was HTML5 attributes 'required' and 'autofocus' for input
fields. Those changes are located in basis.urs and are rather straightforward.
The second thing is the <input type='email'/>. My intuition says me that adding
custom input types was not designed to be regular operation, but building recent
HTML5 pages may require doing it. Quick search [2] shows that there are 'url'
'tel', 'search', 'number', 'range', 'date', etc. I included the monoize.sml
change to support just the [email] for ordinary [formTags]. Is it possible to
prepare a procedure of doing the same thing for [cformTags] (references to
javaScript confuse me)?
For now, the patch makes it possible run the example, the demo is working
http://hit.msk.ru/B3_Login/main
Regards,
Sergey
[1] - http://getbootstrap.com/examples/signin/
[2] - http://html5doctor.com/html5-forms-input-types/
PS
patch doesn't do anything with 'placeholder' attribute. it turns out
it was already added.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_of_1_HTML5_input_attributes__placeholder__required__autofocus__email_input_type__without_cformTag_equivalent_.patch
Type: text/x-patch
Size: 3972 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20141012/6c550ed8/attachment.bin>
More information about the Ur
mailing list