text: import { Observable } from 'rxjs';
  import * as L from '../../../shared/life-cycle';
  import { PluginPriority } from '../plugin';
  export class ObservablePlugin {
      constructor() {
          this.priority = PluginPriority.Fallback;
      }
      setprop(prop, target, host) {
          if (target instanceof Observable) {
              let sub;
              L.attach({
                  bind() {
                      sub = target.subscribe(v => {
                          if (typeof v === 'boolean') {
                              if (v)
                                  host.setAttribute(prop, '');
                              else
                                  host.removeAttribute(prop);
                          }
                          else
                              host.setAttribute(prop, (v !== undefined) ? v.toString() : '');
                      });
                  },
                  clear() { sub.unsubscribe(); },
              }, host);
              return true;
          }
          else
              return false;
      }
      append(target, host) {
          if (target instanceof Observable) {
              let node = document.createTextNode('');
              let sub;
              L.attach({
                  bind() { sub = target.subscribe(v => node.textContent = (v !== undefined) ? v.toString() : ''); },
                  clear() { sub.unsubscribe(); },
              }, node);
              host.appendChild(node);
              return true;
          }
          else
              return false;
      }
  }
  //# sourceMappingURL=observable.js.map