Releases: nhn/tui.code-snippet
Releases · nhn/tui.code-snippet
v2.3.3
v2.3.2
v2.3.1
v2.3.0
Features
- ce12fb3 Feat: ajax (#44)
- A module for the Ajax request. [API Page]
- If the browser supports
Promise
, return thePromise
object. If not, returnnull
after complete the Ajax call. - It supports
beforeRequest
,success
,error
, andcomplete
callbacks. - Common configurations can be specified in
ajax.defaults
. - It provides ES6(
tui-code-snippet/ajax/index.mjs
) and transpiled(tui-code-snippet/ajax/index.js
) files. Transpiled version supports IE8+.
- If the browser supports
- A module for the Ajax request. [API Page]
import ajax from 'tui-code-snippet/ajax'; // import ES6 module (written in ES6)
// import ajax from 'tui-code-snippet/ajax/index.js'; // import transfiled file (IE8+)
ajax({
url: 'https://nhn.github.io/tui-code-snippet/2.3.0/latest',
method: 'POST',
contentType: 'application/json',
params: {
version: 'v2.3.0',
author: 'NHN. FE Development Lab <dl_javascript@nhn.com>'
},
beforeRequest: () => {
showProgressBar();
},
complete: () => {
hideProgressBar();
}
}).then(({ data }) => {
console.log(data);
}).catch(({ status, statusText }) => {
console.error(`${status} - ${statusText}`);
});
v2.2.0
v2.1.0
v2.0.0
Breaking Changes
- The v2.0 should be installed using the
npm
command. CodeSnippet does not support bower and CDN anymore. See the detail here. - The functions are separated into individual files. To use the functions of CodeSnippet, you should import the functions one by one. See the detail here.
- The v2.0 is combined with tui.dom, so domEvent and domUtil functions are added. See the detail here.
- The v2.0 deprecated several functions. See the detail here.
Features
Documentation
- Docs: edit README
- Docs: add getting-started, v2.0-migration-guide