Disposable is returned from various methods to allow undoing the corresponding action. For example,
Playwright.Page.add_init_script/4 returns a Disposable that can be used to remove the init script.
Since Playwright 1.59.
The examples alias the modules they use (alias Playwright.{Locator, Page}).
Summary
Functions
Removes the associated resource. For example, removes the init script installed via
Playwright.Page.add_init_script/4 or Playwright.BrowserContext.add_init_script/4.
Like dispose/1, but returns the value and raises on error.
Types
Functions
@spec dispose(t()) :: :ok | {:error, Playwright.error()}
Removes the associated resource. For example, removes the init script installed via
Playwright.Page.add_init_script/4 or Playwright.BrowserContext.add_init_script/4.
Since Playwright 1.59.
@spec dispose!(t()) :: :ok
Like dispose/1, but returns the value and raises on error.