Plato on Github
Report Home
trait/el_settable.js
Maintainability
79.96
Lines of code
33
Difficulty
12.33
Estimated Errors
0.10
Function weight
By Complexity
By SLOC
'use strict'; /** * @class Phalanx.Trait.ElSettable */ Trait.ElSettable = { /** * @property {HTMLElement} */ el: null, /** * @property {jQuery|Zepto} */ $el: null, /** * @param {HTMLElement|String} element */ setElement: function(element) { this.$el = element instanceof Backbone.$ ? element : Backbone.$(element); this.el = this.$el[0]; if (this.el && this.el.parentNode) { this.onSetElement(this.el); } }, /** * @abstract * @param {HTMLElement} element */ onSetElement: function(element) {} };