code: function updateTernFile(document) {
              var path  = document.file.fullPath;
  
              _postMessageByPass({
                  type       : MessageIds.TERN_UPDATE_FILE_MSG,
                  path       : path,
                  text       : getTextFromDocument(document)
              });
  
              return addPendingRequest(path, OFFSET_ZERO, MessageIds.TERN_UPDATE_FILE_MSG);
          }
docs: Update tern with the new contents of a given file.
  
  @param {Document} document - the document to update
  @return {jQuery.Promise} - the promise for the request