docs/_includes/projects/docs/lifecycle/customsetter/my-element.js
/**
   * Custom property setter for `foo`. 
   * 
   * Call `requestUpdate` when implementing a custom property setter
   * to ensure that changes to the property will trigger updates
   * when required.
   * 
   * Pass the old value of the property to `requestUpdate` so that 
   * any property options can be correctly applied.
   */
Custom property setter for `foo`.

Call `requestUpdate` when implementing a custom property setter
to ensure that changes to the property will trigger updates
when required.

Pass the old value of the property to `requestUpdate` so that
any property options can be correctly applied.
Custom property setter for ` foo ` . Call ` requestUpdate ` when implementing a custom property setter to ensure that changes to the property will trigger updates when required . Pass the old value of the property to ` requestUpdate ` so that any property options can be correctly applied .
set foo(newVal) { 
    let oldVal = this.foo;
    console.log('setting foo from', oldVal, 'to', newVal);
    this.setAttribute('foo', newVal);
    this.requestUpdate('foo', oldVal).then(
      result => console.log('updateComplete:', result)
    );
  }
set foo ( newVal ) { let oldVal = this . foo ; console . log ( 'setting foo from' , oldVal , 'to' , newVal ) ; this . setAttribute ( 'foo' , newVal ) ; this . requestUpdate ( 'foo' , oldVal ) . then ( result => console . log ( 'updateComplete:' , result ) ) ; }
Custom property setter for `foo`.
Custom property setter for ` foo ` .