diff --git a/modules/web/html/html_builder_bind.cpp b/modules/web/html/html_builder_bind.cpp index 036e692c5..577170da3 100644 --- a/modules/web/html/html_builder_bind.cpp +++ b/modules/web/html/html_builder_bind.cpp @@ -881,11 +881,34 @@ Ref<_HTMLBuilder> _HTMLBuilder::doctype(const String &val) { return Ref<_HTMLBuilder>(this); } -Ref<_HTMLTag> _HTMLBuilder::a() { +Ref<_HTMLTag> _HTMLBuilder::a(const String &href, const String &cls, const String &id) { write_tag(); - return tag->start("a"); + tag->start("a"); + + if (href != "") { + tag->href(href); + } + + if (cls != "") { + tag->cls(cls); + } + + if (id != "") { + tag->id(id); + } + + return tag; } + +Ref<_HTMLBuilder> _HTMLBuilder::fa(const String &href, const String &body, const String &cls, const String &id) { + a(href, cls, id); + w(body); + ca(); + + return Ref<_HTMLBuilder>(this); +} + Ref<_HTMLTag> _HTMLBuilder::abbr() { write_tag(); @@ -1078,10 +1101,28 @@ Ref<_HTMLTag> _HTMLBuilder::dir() { // Not supported in HTML5. Use