app/scripts/views/ChannelGuide.js
/**
   * Creates a CTA for the element. In case the video is directly available,
   * show it. Otherwise create a an element to notify when it is available
   *
   * @param {Object} program - The POJO containing program details
   * @return {HTMLElement} element created by hyperHTML (a link or empty text)
   */
Creates a CTA for the element. In case the video is directly available,
show it. Otherwise create a an element to notify when it is available

@param {Object} program - The POJO containing program details
@return {HTMLElement} element created by hyperHTML (a link or empty text)
Creates a CTA for the element . In case the video is directly available show it . Otherwise create a an element to notify when it is available @param { Object } program - The POJO containing program details @return { HTMLElement } element created by hyperHTML ( a link or empty text )
createAction(program) {
    if (program.playbackUrl) {
      return wire()`<a href="${program.playbackUrl}"
        class="mdc-button mdc-button--raised mdc-button--accent mdc-card__action">Katso</a>`;
    }
    if (this.supportsPUSH) {
      const element = wire()`
        <button class="mdc-button mdc-button--raised mdc-card__action">Tilaa</button>
      `;
      element.onclick = (event) => this.registerForProgram(event, program);
      return element;
    }
    return wire()``;
  }
createAction ( program ) { if ( program . playbackUrl ) { return wire ( ) ` ${ program . playbackUrl } ` ; } if ( this . supportsPUSH ) { const element = wire ( ) ` ` ; element . onclick = ( event ) => this . registerForProgram ( event , program ) ; return element ; } return wire ( ) ` ` ; }
Creates a CTA for the element.
Creates a CTA for the element .
// If the element has playback available, create a CTA for it // If PUSH notifications are supported, create an action for registering for PUSH // Else create no action (empty string)