mol_dump_lib 0.0.403 → 0.0.405

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/node.js CHANGED
@@ -3108,14 +3108,13 @@ var $;
3108
3108
  return;
3109
3109
  class Component extends HTMLElement {
3110
3110
  static tag = $$.$mol_func_name(View).replace(/\W/g, '').replace(/^(?=\d+)/, '-').replace(/_/g, '-');
3111
- static observedAttributes = new Set;
3111
+ static observedAttributes = new Set();
3112
3112
  view = new View;
3113
3113
  root;
3114
3114
  connectedCallback() {
3115
3115
  if (!this.shadowRoot) {
3116
3116
  this.attachShadow({ mode: 'open' });
3117
3117
  const node = this.view.dom_node();
3118
- node.setAttribute('mol_view_root', '');
3119
3118
  for (const style of $mol_dom_context.document.getElementsByTagName('style')) {
3120
3119
  this.shadowRoot.append(style.cloneNode(true));
3121
3120
  }
@@ -3136,7 +3135,10 @@ var $;
3136
3135
  this.root = undefined;
3137
3136
  }
3138
3137
  attributeChangedCallback(name, prev, next) {
3139
- this.view[name](JSON.parse(next));
3138
+ if (name[0] === '#')
3139
+ this.view[name.slice(1)](JSON.parse(next));
3140
+ else
3141
+ this.view[name](next);
3140
3142
  }
3141
3143
  toString() {
3142
3144
  return '<' + this.constructor.tag + '#' + this.id + '/>';
@@ -3155,6 +3157,7 @@ var $;
3155
3157
  if (typeof descr.value !== 'function')
3156
3158
  continue;
3157
3159
  Component.observedAttributes.add(field);
3160
+ Component.observedAttributes.add('#' + field);
3158
3161
  }
3159
3162
  attributes_observe(Reflect.getPrototypeOf(proto));
3160
3163
  }