From ee778d6eea54935fd05022e0ba8c49456003381a Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:48:24 +0100 Subject: unslug ko: move --- .../global_objects/proxy/handler/apply/index.html | 154 --------------------- 1 file changed, 154 deletions(-) delete mode 100644 files/ko/web/javascript/reference/global_objects/proxy/handler/apply/index.html (limited to 'files/ko/web/javascript/reference/global_objects/proxy/handler/apply') diff --git a/files/ko/web/javascript/reference/global_objects/proxy/handler/apply/index.html b/files/ko/web/javascript/reference/global_objects/proxy/handler/apply/index.html deleted file mode 100644 index b4928da1d8..0000000000 --- a/files/ko/web/javascript/reference/global_objects/proxy/handler/apply/index.html +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: handler.apply() -slug: Web/JavaScript/Reference/Global_Objects/Proxy/handler/apply -tags: - - apply트랩 - - 트랩 - - 프록시 -translation_of: Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/apply ---- -
{{JSRef}}
- -

handler.apply() 메소드는 함수호출 시를 위한 트랩(trap)이다.

- -

문법

- -
var p = new Proxy(target, {
-  apply: function(target, thisArg, argumentsList) {
-  }
-});
-
- -

인자

- -

apply 메소드에는 다음과 같은 인자가 들어온다.. this는 handler를 가리킨다.

- -
-
target
-
대상이 되는 객체(함수)
-
thisArg
-
호출 시 바인딩 된 this
-
argumentsList
-
호출 시 전달된 인자목록.
-
- -

반환 값

- -

apply 메소드는 어떤 값이든 반환할 수 있다.

- -

설명

- -

handler.apply 메소드는 함수호출 시를 위한 트랩이다.

- -

가로채기

- -

이 트랩은 다음과 같은 것들을 가로챌 수 있다:

- - - -

기본(불변)조건

- -

handler.apply 메소드에 대한 특별히 지켜야 할 기본조건은 없다.

- -

예제

- -

다음의 코드는 함수 호출 시에 트랩을 건다.

- -
var p = new Proxy(function() {}, {
-  apply: function(target, thisArg, argumentsList) {
-    console.log('호출됨: ' + argumentsList.join(', '));
-    return argumentsList[0] + argumentsList[1] + argumentsList[2];
-  }
-});
-
-console.log(p(1, 2, 3)); // "호출됨: 1, 2, 3"
-                         // 6
-
- -

관련 명세

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('ES2015', '#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist', '[[Call]]')}}{{Spec2('ES2015')}}Initial definition.
{{SpecName('ESDraft', '#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist', '[[Call]]')}}{{Spec2('ESDraft')}} 
- -

브라우저별 호환성

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatUnknown}}{{CompatGeckoDesktop("18")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("18")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

관련 내용

- - -- cgit v1.2.3-54-g00ecf