You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use a attribute name 'link' like this {{ item.link }}, and passed a object { item:[] }, after parse it returns a function like this: function (a){for(var b={},c=0,d=this.length;c<d;c++)for(var e in a)if(a[e](this[c])){b[e]=this[c];delete a[e];break}return b}.
The link function is generation by mootools(item is an Array, and mootools changed the Array.prototype).
So, I need avoid to use link or other special attributes, It's cost a lot of time to check. but for another scene, useful for bind func on onclick.
<buttononclick="{{ item.clickFunc }}"></button>
Type of object
For special scene, It's need return the encoded JSON.
Description
Typeof function
When I use a attribute name 'link' like this
{{ item.link }}
, and passed a object{ item:[] }
, after parse it returns a function like this:function (a){for(var b={},c=0,d=this.length;c<d;c++)for(var e in a)if(a[e](this[c])){b[e]=this[c];delete a[e];break}return b}
.So, I need avoid to use
link
or other special attributes, It's cost a lot of time to check. but for another scene, useful for bind func on onclick.Type of object
For special scene, It's need return the encoded JSON.
Now, only for the TextNode.
Suggest
Ideas
We always focus on the passed objects(sodaScope), and don't care with the attributes on there
prototype
, add hasOwnProperty to check attributes.check the element attributes name like 'onclick', bad way!!!typeof object, use JSON.stringify.
The text was updated successfully, but these errors were encountered: