Skip to main content

postDelayedMessage

postDelayedMessage

Sends a message after the delay you specify.

Parameters

  • name (string): The message name, which routes to the onMessage handler
  • data (any): The payload (may be null)
  • target (string, optional): Same as postMessage's target
  • milliSeconds (number): How long to wait before sending, in milliseconds

Returns: None (void)

Description

Behaves the same as postMessage but sends after the given milliseconds. If the form is disposed before the timer fires, the message is cancelled.

Example

// 1초 후 자기 자신에게 메시지
$form.postDelayedMessage("autoClose", null, null, 1000);

// 500ms 후 자식 폼에 전달
$form.postDelayedMessage("refresh", { id: 7 }, "detailPanel", 500);

Related

  • $form.postMessage(name, data, target) — sends immediately
  • $form.postMessageAll(name, data) — sends to all children immediately
  • $form.runDelayedScript(milliSeconds, function) — runs a function after a delay