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.

TypedArray.prototype.byteLength

byteLength 접근자(accessor) 속성(property)은 형식화 배열의 길이(바이트 단위)를 나타냅니다.

구문

typedarray.byteLength

설명

byteLength 속성은 접근자 함수가 undefined인 접근자 속성입니다, 이 속성을 읽을 수만 있음을 뜻하는. 그 값은 TypedArray가 만들어질 때 수립되어 변경될 수 없습니다. TypedArraybyteOffset 또는 length를 지정하지 않은 경우, 참조되는 ArrayBufferlength가 반환됩니다. TypedArrayTypedArray 객체 유형 중 하나입니다.

byteLength 속성 사용

var buffer = new ArrayBuffer(8);

var uint8 = new Uint8Array(buffer);
uint8.byteLength; // 8 (버퍼의 byteLength와 일치)

var uint8 = new Uint8Array(buffer, 1, 5);
uint8.byteLength; // 5 (Uint8Array를 만들 때 지정된 대로)

var uint8 = new Uint8Array(buffer, 2);
uint8.byteLength; // 6 (만든 Uint8Array의 오프셋으로 인해)

스펙

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

브라우저 호환성

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 7.0 4.0 (2) 10 11.6 5.1
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 4.0 (Yes) 4.0 (2) 10 11.6 4.2

참조

문서 태그 및 공헌자

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