function initialize() {
      nativeLayer.setInitialSettings(initialSettings);
      nativeLayer.setLocalDestinationCapabilities(
          print_preview_test_utils.getCddTemplate(initialSettings.printerName));
      nativeLayer.setPageCount(3);

      page = document.createElement('print-preview-app');
      const previewArea = page.$$('print-preview-preview-area');
      previewArea.plugin_ = new print_preview.PDFPluginStub(
          previewArea.onPluginLoad_.bind(previewArea));
      document.body.appendChild(page);
      return Promise
          .all([
            nativeLayer.whenCalled('getInitialSettings'),
            nativeLayer.whenCalled('getPrinterCapabilities'),
          ])
          .then(function() {
            if (!documentInfo)
              initDocumentInfo(false, false);
            page.set('documentInfo_', documentInfo);
            page.notifyPath('documentInfo_.isModifiable');
            return nativeLayer.whenCalled('getPreview');
          });
    }
/**
     * Initializes the UI with a default local destination. |documentInfo| is
     * initialized to a 3 page HTML document with no selection if it has not
     * been set yet.
     * @return {!Promise} Promise that resolves when initialization is done,
     *     destination is set, and initial preview request is complete.
     */
Initializes the UI with a default local destination. |documentInfo| is
initialized to a 3 page HTML document with no selection if it has not
been set yet.
@return {!Promise} Promise that resolves when initialization is done,
destination is set, and initial preview request is complete.
Initializes the UI with a default local destination . |documentInfo| is initialized to a 3 page HTML document with no selection if it has not been set yet . @return { !Promise } Promise that resolves when initialization is done destination is set and initial preview request is complete .
function initialize() {
      nativeLayer.setInitialSettings(initialSettings);
      nativeLayer.setLocalDestinationCapabilities(
          print_preview_test_utils.getCddTemplate(initialSettings.printerName));
      nativeLayer.setPageCount(3);
      page = document.createElement('print-preview-app');
      const previewArea = page.$$('print-preview-preview-area');
      previewArea.plugin_ = new print_preview.PDFPluginStub(
          previewArea.onPluginLoad_.bind(previewArea));
      document.body.appendChild(page);
      return Promise
          .all([
            nativeLayer.whenCalled('getInitialSettings'),
            nativeLayer.whenCalled('getPrinterCapabilities'),
          ])
          .then(function() {
            if (!documentInfo)
              initDocumentInfo(false, false);
            page.set('documentInfo_', documentInfo);
            page.notifyPath('documentInfo_.isModifiable');
            return nativeLayer.whenCalled('getPreview');
          });
    }
function initialize ( ) { nativeLayer . setInitialSettings ( initialSettings ) ; nativeLayer . setLocalDestinationCapabilities ( print_preview_test_utils . getCddTemplate ( initialSettings . printerName ) ) ; nativeLayer . setPageCount ( 3 ) ; page = document . createElement ( 'print-preview-app' ) ; const previewArea = page . $$ ( 'print-preview-preview-area' ) ; previewArea . plugin_ = new print_preview . PDFPluginStub ( previewArea . onPluginLoad_ . bind ( previewArea ) ) ; document . body . appendChild ( page ) ; return Promise . all ( [ nativeLayer . whenCalled ( 'getInitialSettings' ) , nativeLayer . whenCalled ( 'getPrinterCapabilities' ) , ] ) . then ( function ( ) { if ( ! documentInfo ) initDocumentInfo ( false , false ) ; page . set ( 'documentInfo_' , documentInfo ) ; page . notifyPath ( 'documentInfo_.isModifiable' ) ; return nativeLayer . whenCalled ( 'getPreview' ) ; } ) ; }
Initializes the UI with a default local destination.
Initializes the UI with a default local destination .