Google Apps Script API
    Preparing search index...

    An object representing a bookmark.

    // Insert a bookmark at the cursor position and log its ID.
    var doc = DocumentApp.getActiveDocument();
    var cursor = doc.getCursor();
    var bookmark = doc.addBookmark(cursor);
    Logger.log(bookmark.getId());
    
    interface Bookmark {
        getId(): string;
        getPosition(): GoogleAppsScript.Document.Position;
        remove(): void;
    }
    Index

    Methods