getContext( )


Gets the data object that was passed to a lightbox.

Retrieves the data object, if any, that was passed when a lightbox was opened with the openLightbox() method. If a lightbox was opened in any other way, getContext() returns undefined.

To pass data to a lightbox, it must be opened programmatically using the openLightbox() method. Lightboxes that are opened automatically on page load, or with a link from a page element don't receive passed data.

Note: While the editor and dashboard now refer to these elements as popups, the API methods and documentation continue to use the term lightbox for consistency and backward compatibility.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Response
Did this help?