[Pas2js] fieldset (or other tag) change the disabled attribute

Michael Van Canneyt michael at freepascal.org
Thu Sep 29 20:04:47 CEST 2022

On Thu, 29 Sep 2022, Luca Olivetti via Pas2js wrote:

> El 28/9/22 a les 20:08, Michael Van Canneyt via Pas2js ha escrit:
>>> I suppose it's just lack of time.
>> Correct.
>> Patches accepted, obviously.
> That's what I thought.
> I suppose I can easily patch TButton (and other components like it when I 
> need them), but do you think it's better to use "enabled" (like a normal 
> lazarus control) or "disabled" (what the underlying html element has)?

Stay as close as possible to the underlying element, so 'disabled' seems

> The second question (T*Widgets vs. TJSHTMElements) is still unanswered ;-)

It cannot be answered in general: it depends on your needs.

For more complicated projects I personally use the widgets because they automate
many tasks. The ability to work with a TDatamodule/"TForm" and data aware stuff are
time-savers, they do not exist for simple elements.

For simple projects, the elements are sufficient; The tool to create
a "form" definition based on a HTML file makes it easy to work with them,
but you must then manually implement a lot of things using HTML things such as querySelectorAll.


More information about the Pas2js mailing list