2019-03-28 Thr
I had coding at Saizeriya.
I struggled to introduce new concept into my library as an experimental.
The new concept is data mapping method.
Current concept was mapping by property name vs class of element.
For example, the value of an_object.prop will map to the element that has "prop" in class attribute.
an_object.prop <div> <div class="prop"></div> </div>
This concept is very simple and easy to understand.
But cons is unexpected mapping to many elements.
For example, You want to map only element under the element that has "first" in class.
But the an_object.prop will map to all elements that has "prop" in class attribute.
an_object.prop <div class="first"> <div class="prop"></div> </div> <div class="second"> <div class="prop"></div> </div>
Thus new concept is considering data structure.
If there is an object like below,
first.prop
It produces a selector like,
".first .prop"
In the case of below tags, the prop is mapped to only element under the element that has "first" in class.
<div class="first"> <div class="prop"></div> </div> <div class="second"> <div class="prop"></div> </div>