mol_dump_lib 0.0.402 → 0.0.404

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web.js CHANGED
@@ -2604,14 +2604,13 @@ var $;
2604
2604
  return;
2605
2605
  class Component extends HTMLElement {
2606
2606
  static tag = $$.$mol_func_name(View).replace(/\W/g, '').replace(/^(?=\d+)/, '-').replace(/_/g, '-');
2607
- static observedAttributes = new Set;
2607
+ static observedAttributes = new Set();
2608
2608
  view = new View;
2609
2609
  root;
2610
2610
  connectedCallback() {
2611
2611
  if (!this.shadowRoot) {
2612
2612
  this.attachShadow({ mode: 'open' });
2613
2613
  const node = this.view.dom_node();
2614
- node.setAttribute('mol_view_root', '');
2615
2614
  for (const style of $mol_dom_context.document.getElementsByTagName('style')) {
2616
2615
  this.shadowRoot.append(style.cloneNode(true));
2617
2616
  }
@@ -2632,7 +2631,10 @@ var $;
2632
2631
  this.root = undefined;
2633
2632
  }
2634
2633
  attributeChangedCallback(name, prev, next) {
2635
- this.view[name](JSON.parse(next));
2634
+ if (name[0] === '#')
2635
+ this.view[name.slice(1)](JSON.parse(next));
2636
+ else
2637
+ this.view[name](next);
2636
2638
  }
2637
2639
  toString() {
2638
2640
  return '<' + this.constructor.tag + '#' + this.id + '/>';
@@ -2651,6 +2653,7 @@ var $;
2651
2653
  if (typeof descr.value !== 'function')
2652
2654
  continue;
2653
2655
  Component.observedAttributes.add(field);
2656
+ Component.observedAttributes.add('#' + field);
2654
2657
  }
2655
2658
  attributes_observe(Reflect.getPrototypeOf(proto));
2656
2659
  }