From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../globaleventhandlers/oncontextmenu/index.html | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 files/ko/web/api/globaleventhandlers/oncontextmenu/index.html (limited to 'files/ko/web/api/globaleventhandlers/oncontextmenu') diff --git a/files/ko/web/api/globaleventhandlers/oncontextmenu/index.html b/files/ko/web/api/globaleventhandlers/oncontextmenu/index.html new file mode 100644 index 0000000000..c13513c82e --- /dev/null +++ b/files/ko/web/api/globaleventhandlers/oncontextmenu/index.html @@ -0,0 +1,103 @@ +--- +title: GlobalEventHandlers.oncontextmenu +slug: Web/API/GlobalEventHandlers/oncontextmenu +translation_of: Web/API/GlobalEventHandlers/oncontextmenu +--- +
{{ ApiRef("HTML DOM") }}
+ +

윈도우에서 마우스 오른쪽 클릭시 발생하는 이벤트 이벤트 핸들러 속성 입니다. 기본동작을 막지 않는 한 (아래의 예제를 참조하세요), 브라우저의 컨텍스트 메뉴가 활성화됩니다. (그러나 IE8는 이것과 관련된 버그가 있어 contextmenu 가 정의 되어있다고 할지라도 활성화 되지 않습니다).  이 이벤트는 비활성화되지 않은(non-disabled) 오른쪽 클릭 이벤트와 함께 발생하며   "contextmenu" 속성 을 가진 엘리먼트에는 달리지 않는다는 것을 유의하세요.

+ +

Syntax

+ +
window.oncontextmenu = funcRef;
+//funcRef refers to the function to be called
+ +

Example

+ +

페이지상에서 오른쪽 클릭을 막는 예제들 입니다:

+ +
document.oncontextmenu = function () { // Use document as opposed to window for IE8 compatibility
+   return false;
+};
+
+window.addEventListener('contextmenu', function (e) { // Not compatible with IE < 9
+    e.preventDefault();
+}, false);
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG','webappapis.html#handler-oncontextmenu','oncontextmenu')}}{{Spec2('HTML WHATWG')}} 
+ +

Browser Compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
-- cgit v1.2.3-54-g00ecf