事件:'resize'
添加於:v0.7.7
每當 writeStream.columns
或 writeStream.rows
屬性發生更改時,都會發出 'resize'
事件。調用時沒有參數傳遞給偵聽器回調。
process.stdout.on('resize', () => {
console.log('screen size has changed!');
console.log(`${process.stdout.columns}x${process.stdout.rows}`);
});
相關用法
- Node.js tls.Server 'resumeSession'事件用法及代碼示例
- Node.js ClientHttp2Stream 'response'事件用法及代碼示例
- Node.js InterfaceConstructor 'resume'事件用法及代碼示例
- Node.js REPLServer 'reset'事件用法及代碼示例
- Node.js Http2Session 'remoteSettings'事件用法及代碼示例
- Node.js stream.Readable 'readable'事件用法及代碼示例
- Node.js proces 'rejectionHandled'事件用法及代碼示例
- Node.js tls.Server 'keylog'事件用法及代碼示例
- Node.js http.Server 'clientError'事件用法及代碼示例
- Node.js cluste 'disconnect'事件用法及代碼示例
- Node.js proces 'exit'事件用法及代碼示例
- Node.js stream.Writable 'pipe'事件用法及代碼示例
- Node.js stream.Readable 'end'事件用法及代碼示例
- Node.js cluste 'fork'事件用法及代碼示例
- Node.js stream.Writable 'unpipe'事件用法及代碼示例
- Node.js Worker 'listening'事件用法及代碼示例
- Node.js InterfaceConstructor 'pause'事件用法及代碼示例
- Node.js fs.FSWatcher 'change'事件用法及代碼示例
- Node.js stream.Readable 'data'事件用法及代碼示例
- Node.js http.ClientRequest 'connect'事件用法及代碼示例
- Node.js proces 'uncaughtException'事件用法及代碼示例
- Node.js Http2Session 'localSettings'事件用法及代碼示例
- Node.js REPLServer 'exit'事件用法及代碼示例
- Node.js cluste 'online'事件用法及代碼示例
- Node.js tls.TLSSocket 'session'事件用法及代碼示例
注:本文由純淨天空篩選整理自nodejs.org大神的英文原創作品 'resize'事件。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。