flushCustomStyles() {
    this._ensure();
    if (!this._customStyleInterface) {
      return;
    }
    let customStyles = this._customStyleInterface['processStyles']();
    // early return if custom-styles don't need validation
    if (!this._customStyleInterface['enqueued']) {
      return;
    }
    if (!nativeCssVariables) {
      this._updateProperties(this._documentOwner, this._documentOwnerStyleInfo);
      this._applyCustomStyles(customStyles);
    } else {
      this._revalidateCustomStyleApplyShim(customStyles);
    }
    this._customStyleInterface['enqueued'] = false;
    // if custom elements have upgraded and there are no native css variables, we must recalculate the whole tree
    if (this._elementsHaveApplied && !nativeCssVariables) {
      this.styleDocument();
    }
  }
/**
   * Flush and apply custom styles to document
   */
Flush and apply custom styles to document
Flush and apply custom styles to document
flushCustomStyles() {
    this._ensure();
    if (!this._customStyleInterface) {
      return;
    }
    let customStyles = this._customStyleInterface['processStyles']();
    if (!this._customStyleInterface['enqueued']) {
      return;
    }
    if (!nativeCssVariables) {
      this._updateProperties(this._documentOwner, this._documentOwnerStyleInfo);
      this._applyCustomStyles(customStyles);
    } else {
      this._revalidateCustomStyleApplyShim(customStyles);
    }
    this._customStyleInterface['enqueued'] = false;
    if (this._elementsHaveApplied && !nativeCssVariables) {
      this.styleDocument();
    }
  }
flushCustomStyles ( ) { this . _ensure ( ) ; if ( ! this . _customStyleInterface ) { return ; } let customStyles = this . _customStyleInterface [ 'processStyles' ] ( ) ; if ( ! this . _customStyleInterface [ 'enqueued' ] ) { return ; } if ( ! nativeCssVariables ) { this . _updateProperties ( this . _documentOwner , this . _documentOwnerStyleInfo ) ; this . _applyCustomStyles ( customStyles ) ; } else { this . _revalidateCustomStyleApplyShim ( customStyles ) ; } this . _customStyleInterface [ 'enqueued' ] = false ; if ( this . _elementsHaveApplied && ! nativeCssVariables ) { this . styleDocument ( ) ; } }
Flush and apply custom styles to document
Flush and apply custom styles to document
// early return if custom-styles don't need validation // if custom elements have upgraded and there are no native css variables, we must recalculate the whole tree