★ wanayoo — archive 1999 https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/exportNouvelle recherche | Portail wanayoo
아직 자원 봉사자들이 한국어로 현재 문서를 번역하지 않았습니다. 가입해서 이 문서가 번역되는 일에 함께 해 주세요!

This is a new technology, part of the ECMAScript 2015 (ES6) standard .
This technology's specification has been finalized, but check the compatibility table for usage and implementation status in various browsers.

The following content does not reflect the final state of the ECMAScript 6 modules specification. For more accurate documentation, see ECMAScript 6 modules: the final syntax.

The export statement is used to allow a signed script to provide properties, functions, and objects to other signed or unsigned scripts. It is an ancient Netscape 4 feature that has been removed in Firefox 3.5 (bug 447713). A new export declaration is specified by ECMAScript 2015 modules.

Syntax

Example 1:
export name1, name2, ..., nameN;

Example 2:
export *; 
nameN
Property, function, or object to be exported.

Description

Typically, information in a signed script is available only to scripts signed by the same principals. By exporting properties, functions, or objects, a signed script makes this information available to any script (signed or unsigned). The receiving script uses the companion import statement to access the information.

Example 1 shows the syntax for exporting specified properties, functions, and objects.

Example 2 shows the syntax for exporting all the properties, functions, and objects from the script.

Specifications

Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Imports' in that specification.
Standard Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support Not supported Not supported Not supported Not supported Not supported
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported Not supported Not supported Not supported Not supported Not supported

See also

문서 태그 및 공헌자

최종 변경: atul,
사이드바 숨기기