diff options
author | Matt Dumler <mattd3v@pm.me> | 2020-05-18 14:53:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 15:53:25 -0400 |
commit | 88b24261ba467c20d4ef90224b07c19a71398f0f (patch) | |
tree | 0c5b47c766208877adc3a2afb16506c888d6e50b /docs/runtime/program_lifecycle.md | |
parent | 76ee5c780848a922dfc0ab8ac48096ab2262cc4a (diff) |
adjust docs (#5598)
Diffstat (limited to 'docs/runtime/program_lifecycle.md')
-rw-r--r-- | docs/runtime/program_lifecycle.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/runtime/program_lifecycle.md b/docs/runtime/program_lifecycle.md index df8bbac65..4a94d6724 100644 --- a/docs/runtime/program_lifecycle.md +++ b/docs/runtime/program_lifecycle.md @@ -3,8 +3,8 @@ Deno supports browser compatible lifecycle events: `load` and `unload`. You can use these events to provide setup and cleanup code in your program. -Listener for `load` events can be asynchronous and will be awaited. Listener for -`unload` events need to be synchronous. Both events cannot be cancelled. +Listeners for `load` events can be asynchronous and will be awaited. Listeners +for `unload` events need to be synchronous. Both events cannot be cancelled. Example: @@ -51,7 +51,7 @@ console.log("log from imported script"); Note that you can use both `window.addEventListener` and `window.onload`/`window.onunload` to define handlers for events. There is a -major difference between them, let's run example: +major difference between them, let's run the example: ```shell $ deno run main.ts |