What is use of tagName, id, and className properties in Backbone View? While we can access dom element with el

Those properties are used if your view has to create its own element, that is, if it doesn’t have a el attribute when instantiated (various reasons, I can go further in the matter). So you’ll have a new element with the id id, classes className and attributes attributes.

You can find the relevant piece of code here. This _ensureElement method is used in the view’s constructor.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)