PageSourceSearch

https://kpia.re.kr/assets/controllers/base/prompt_confirmation_controller-174e8bef.js

js kpia.re.kr collected 2026-10-03 00:25:24 UTC 720 bytes, 23 lines download raw bytes

1import { Controller } from '@hotwired/stimulus';
2
3/**
4 * @domain 폼 라이프사이클
5 * @concern 사용자 확인 문구 입력을 통한 액션 실행 전 확인
6 * @description prompt로 사용자 입력을 받아 지정된 문자열과 일치하는지 검사하고, 일치하지 않으면 이벤트를 취소하고 알림을 띄우는 컨트롤러
7 */
8export default class extends Controller {
9  static values = {
10    prompt: String,
11    expect: String,
12  };
13
14  handle(event) {
15    const userInput = prompt(this.promptValue);
16
17    if (userInput !== this.expectValue) {
18      event.preventDefault();
19      alert('입력한 메시지가 일치하지 않습니다. 취소합니다.');
20      return false;
21    }
22  }
23}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.