API Reference
Learn more about the methods available to use when working with Docs Embed programmatically
Method Comparison
Method
Standalone Script
NPM Package
React Components
Standalone Script API
Initialization
GitBook('init', options, frameOptions)
GitBook('init', options, frameOptions)Widget Control
Show the widget
Hide the widget
Open the window
Close the window
Toggle the window
Unload the widget
Navigation
GitBook('navigateToPage', path)
GitBook('navigateToPage', path)GitBook('navigateToAssistant')
GitBook('navigateToAssistant')Chat
GitBook('postUserMessage', message)
GitBook('postUserMessage', message)GitBook('clearChat')
GitBook('clearChat')Configuration
GitBook('configure', settings)
GitBook('configure', settings)NPM Package API
Client Factory
createGitBook(options)
createGitBook(options)client.getFrameURL(options)
client.getFrameURL(options)client.createFrame(iframe)
client.createFrame(iframe)Frame Client Methods
frame.navigateToPage(path)
frame.navigateToPage(path)frame.navigateToAssistant()
frame.navigateToAssistant()frame.postUserMessage(message)
frame.postUserMessage(message)frame.clearChat()
frame.clearChat()frame.configure(settings)
frame.configure(settings)frame.on(event, listener)
frame.on(event, listener)React Components API
Last updated
Was this helpful?