Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

WeakMap.prototype

WeakMap.prototype 속성(property)은 WeakMap 생성자에 대한 프로토타입을 나타냅니다.

Property attributes of WeakMap.prototype
Writable no
Enumerable no
Configurable no

설명

WeakMap 인스턴스는 WeakMap.prototype에서 상속합니다. 모든 WeakMap 인스턴스에 속성 또는 메서드를 추가하기 위해 생성자의 프로토타입 객체를 사용할 수 있습니다.

WeakMap.prototype은 그 자체로 그냥 평범한 객체입니다:

Object.prototype.toString.call(WeakMap.prototype); // "[object Object]"

속성

WeakMap.prototype.constructor
인스턴스의 프로토타입을 생성한 함수를 반환합니다. 이는 기본으로 WeakMap 함수입니다.

메서드

WeakMap.prototype.delete(key)
key와 관련된 모든 값을 제거합니다. WeakMap.prototype.has(key)는 그 뒤에 false를 반환합니다.
WeakMap.prototype.get(key)
key와 관련된 값 또는 관련 값이 없는 경우 undefined를 반환합니다.
WeakMap.prototype.has(key)
WeakMap 객체 내 key와 관련된 값이 있는지 여부를 주장하는(asserting, 나타내는) boolean을 반환합니다.
WeakMap.prototype.set(key, value)
WeakMap 객체 내 key에 대해 값을 설정합니다. WeakMap 객체를 반환합니다.
WeakMap.prototype.clear()
WeakMap 객체에서 모든 키/값 쌍을 제거합니다. 메서드가 없는 WeakMap 객체를 캡슐화하여 .clear() 메서드가 있는 WeakMap 같은 객체 구현이 가능함을 주의하세요 (WeakMap 페이지 예 참조)

스펙

스펙 상태 설명
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'WeakMap.prototype' in that specification.
Standard 초기 정의.
ECMAScript 2017 Draft (ECMA-262)
The definition of 'WeakMap.prototype' in that specification.
Draft  

브라우저 호환성

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 36 6.0 (6.0) 11 23 7.1
Ordinary object ? 40 (40) ? ? ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support No support 6.0 (6.0) No support No support 8
Ordinary object ? ? 40.0 (40) ? ? ?

참조

문서 태그 및 공헌자

 이 페이지의 공헌자: Netaras
 최종 변경: Netaras,