> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: siteWindow.getContext() # Method Link: https://dev.wix.com/docs/sdk/frontend-modules/window/lightbox/get-context.md # Method Description: Gets the data object that was passed to a popup. > **Note:** The terms popup and lightbox refer to the same element. While the editor and dashboard now refer to it as a [popup](https://support.wix.com/en/article/studio-editor-using-popups), the API methods continue to use the term lightbox for backward compatibility. The documentation uses both terms accordingly. Retrieves the data object, if any, that was passed when a popup was opened with the [`openLightbox()`](https://dev.wix.com/docs/velo/api-reference/wix-window-frontend/open-lightbox.md) method. If a popup was opened in any other way, `getContext()` returns `undefined`. To pass data to a popup, it must be opened programmatically using the [`openLightbox()`](https://dev.wix.com/docs/velo/api-reference/wix-window-frontend/open-lightbox.md) method. Popups that are opened automatically on page load, or with a link from a page element don't receive passed data. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Get the data that was passed to a lightbox ```javascript import { lightbox } from '@wix/site-window'; // ... let receivedData = await lightbox.getContext(); ``` ## A scenario where information is passed between a page and a lightbox ```javascript /************* * Page Code * *************/ import { lightbox } from '@wix/site-window'; $w('#myOpenButton').onClick(async (event) => { await lightbox.openLightbox("MyLightBox", { "pageSend1": $w('#pageSend1').value, "pageSend2": $w('#pageSend2').value }) .then( (data) => { $w('#pageReceive1').text = data.lightBoxSend1; $w('#pageReceive2').text = data.lightBoxSend2; } ); }) /***************** * Lightbox Code * *****************/ import { lightbox } from '@wix/site-window'; $w.onReady(async function () { let received = await lightbox.getContext(); $w('#lightBoxReceive1').text = received.pageSend1; $w('#lightBoxReceive2').text = received.pageSend2; } ); $w('#myCloseButton').onClick(async (event) => { await lightbox.close( { "lightBoxSend1": $w('#lightBoxSend1').value, "lightBoxSend2": $w('#lightBoxSend2').value } ); } ); ```