WIP: Aureplop/kpsul js refactor #501

Draft
delobell wants to merge 215 commits from aureplop/kpsul_js_refactor into master
Showing only changes of commit a9d1a6aae9 - Show all commits

View file

@ -525,15 +525,15 @@ class Formatter {
var prefix_prop = options.prefix_prop !== undefined ? options.prefix_prop : '.';
var prefix_attr = options.prefix_attr !== undefined ? options.prefix_attr : '';
for (var i in props) {
var selector = prefix_prop + props[i];
var html = options.empty_props ? '' : this.get_prop(object, props[i]);
for (let prop of props) {
var selector = prefix_prop + prop;
var html = options.empty_props ? '' : this.get_prop(object, prop);
$container.find( selector ).html( html );
}
for (var i in attrs) {
var name = prefix_attr + attrs[i];
var value = options.empty_attrs ? '' : this.get_attr(object, attrs[i]);
for (let attr of attrs) {
var name = prefix_attr + attr;
var value = options.empty_attrs ? '' : this.get_attr(object, attr);
$container.attr( name, value );
}