CloseWatcher: close() method

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("HTML DOM")}}

The **close()** method of the {{domxref("CloseWatcher")}} interface lets you skip any logic in the cancel event handler and immediately fire the close event. It then deactivates the close watcher as if destroy() was called.

Syntax

js-nolint
close()

Parameters

None.

Return value

None ({{jsxref("undefined")}}).

Examples

Using the close() method

Use the close() method to deactivate the close watcher and destroy it.

js
watcher.close();

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}