-// Copyright (c) 2008-2013 Kris Maglione <maglione.k at Gmail>
+// Copyright (c) 2008-2014 Kris Maglione <maglione.k at Gmail>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
if (/^[[>+: ]/.test(args[1]))
obj.selector = this.selector(obj.class) + args[1];
else if (args[1])
- obj.selector = this.selector(args[1]);
+ obj.selector = this.selector(args[1].replace(/^,/, ""));
if (old && old.value != old.defaultValue)
obj.value = old.value;
obj.style.enabled = true;
else
this.loaded.__defineSetter__(obj.class, function () {
- delete this[obj.class];
- this[obj.class] = true;
+ Object.defineProperty(this, obj.class, {
+ value: true,
+ configurable: true,
+ enumerable: true,
+ writable: true
+ });
if (obj.class === obj.baseClass)
for (let h in highlight)
node.setAttributeNS(NS, "highlight", group);
let groups = group.split(" ");
- for each (let group in groups)
+ for (let group of groups)
this.loaded[group] = true;
if (applyBindings)
- for each (let group in groups) {
+ for (let group of groups) {
if (applyBindings.bindings && group in applyBindings.bindings)
applyBindings.bindings[group](node, applyBindings);
else if (group in template.bindings)
* If Star is provided, the style is applied as an agent sheet.
*
* The new styles are lazily activated unless Bang or *eager* is
- * provided. See {@link Util#xmlToDom}.
+ * provided.
*
* @param {string} css The rules to load. See {@link Highlights#css}.
* @param {boolean} eager When true, load all provided rules immediately.