# NewLayoutOptions

**Kind**: interface | **Module**: [Layouts](https://docs.interop.io/browser/reference/javascript/layouts/index.md)

**Source**: https://docs.interop.io/browser/reference/javascript/layouts/newlayoutoptions/index.html

Options for saving a Layout.

## Properties

- **`context`** (`any`, optional)
  Context to be saved with the Layout. Used for transferring data to the apps when restoring a Layout.
- **`ignoreContexts`** (`boolean`, optional) default: `false` *(since io.Connect Browser 4.3)*
  If `true`, the context objects of individual io.Connect Windows and Workspaces participating in the Global Layout won't be saved when the Layout is saved.
  This is valid for context objects returned by the `onSaveRequested()` event handler, as well as for context objects
  set via the `setContext()` method of a `WebWindow` instance.
  You can still use the `context` property of the `NewLayoutOptions` object to provide context data to be saved for the Global Layout itself.
- **`ignoreInstances`** (`string[]`, optional)
  Window or app instance IDs of the instances to be ignored when saving the Layout.
- **`instances`** (`string[]`, optional)
  Window or app instance IDs of the instances to be saved in the Layout.
- **`metadata`** (`any`, optional)
  Metadata to be saved with the Layout.
- **`name`** (`string`, required)
  Name for the Layout.
- **`saveWindowContexts`** (`boolean`, optional) default: `false` *(since io.Connect Browser 4.4)*
  If `true`, the context objects of individual io.Connect Windows set via the `setContext()` method of a `WebWindow` instance
  will be saved when the Global Layout is saved. This is valid both for Browser Client apps, as well as for windows that have been
  opened by the Main app or by a Browser Client, but aren't Browser Clients themselves (i.e., don't use the io.Connect libraries).
  If a Browser Client has subscribed for the `onSaveRequested()` event and its context has also been set via the `setContext()` method,
  the context returned by the `onSaveRequested()` event handler will take precedence.
  If the `ignoreContexts` property of the `NewLayoutOptions` object is set to `true`, this property will be ignored.
- **`setAsCurrent`** (`boolean`, optional) default: `true` *(since io.Connect Browser 4.2)*
  If `true`, will set the saved Layout as the current Global Layout.
