Element - OtagJS/Otag GitHub Wiki

Öge bir Web uygulamasının Görünüm katmanını oluşturur. Bu yüzden Otağ geliştirilirken Öge'ye önem verilmiş ve kullanışlı yöntemler tasarlamak amaçlanmıştır.

A DOM Element forms the View layer of Web Applications. Considering this fact, we emphasise Element in the design part of Otağ and aimed to develope useful methods.

Method Description
.set Writes inside to an Element.
.val Returns the value of Element.
.append Appends element/s into the Element
.has Connects Element to another Element
.layout Creates layout inside the Element.
.attr Defines attributions to Element .
.prop Defines properties to Element.
.resp Defines responsive properties to Element.
.disp Changes visibility of Element.
.destroy Removes element from page with delay.
.interval Defines intervals to Element
.Class Defines and removes classes

Bu yöntemlerin yanı sıra Öge oluşturmak ve değişiklik yapmak en sık yapılan iş olduğu için yazım yalınlaştırılmış, kesintisiz yazımlara olanak sağlamak için bağlamlar korunmuştur (Yöntemler çağrıldığı zaman Öge'nin kendisi döner).

Bir Otağ uygulamasında DOM (Belge Nesne Kipi) Ögesi Yazı ile doğrudan ya da yöntemlerin içinde (.has,.layout) dolaylı olarak oluşturulabilir. Öge'nin sunulan değerine .val ile erişilebilir