This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| <button id="start">开始录制</button> | |
| <button id="end">结束录制</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Promise { | |
| constructor(executor) { | |
| if (typeof executor !== 'function') { | |
| throw new TypeError("Promise resolver undefined is not a function") | |
| } | |
| this.status = 'pending' | |
| this.value = undefined | |
| this.onResolvedCallback = [] | |
| this.onRejectedCallback = [] |