Skip to content

Add the "Check if an image has loaded" example#33

Merged
DIRECTcut merged 15 commits into
DevExpress:masterfrom
DIRECTcut:check-if-image-loaded-without-errors
Oct 20, 2020
Merged

Add the "Check if an image has loaded" example#33
DIRECTcut merged 15 commits into
DevExpress:masterfrom
DIRECTcut:check-if-image-loaded-without-errors

Conversation

@DIRECTcut
Copy link
Copy Markdown
Contributor

@DIRECTcut DIRECTcut requested a review from miherlosev October 12, 2020 09:50
Comment thread examples/check-if-image-loaded-without-errors/index.html
Comment thread examples/check-if-image-loaded-without-errors/index.js Outdated
Comment thread examples/check-if-image-loaded-without-errors/index.js Outdated
Comment thread examples/check-if-image-loaded-without-errors/index.js Outdated
Comment thread examples/check-if-image-loaded-without-errors/index.js Outdated
Comment thread examples/check-if-image-loaded-without-errors/index.html Outdated
Comment thread server/index.js Outdated
@DIRECTcut DIRECTcut self-assigned this Oct 13, 2020
Comment thread examples/check-if-image-loaded/README.md Outdated
Comment thread examples/check-if-image-loaded/README.md Outdated
@DIRECTcut DIRECTcut requested a review from miherlosev October 14, 2020 17:43
Sergey Afonchenko and others added 2 commits October 14, 2020 21:03

If the image loads, the promise is resolved, otherwise it's rejected.

During the test the `t.expect.ok` method checks the promise's status.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During the test the t.expect.ok method checks the promise's resolved value.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve

Copy link
Copy Markdown
Contributor Author

@DIRECTcut DIRECTcut Oct 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During the test, the t.expect.ok method waits for the promise to resolve and checks its result.

@DIRECTcut DIRECTcut changed the title Add example Add the "Check if an image has loaded" example Oct 15, 2020
Sergey Afonchenko and others added 2 commits October 15, 2020 21:19
@DIRECTcut DIRECTcut merged commit 712ee84 into DevExpress:master Oct 20, 2020
@DIRECTcut DIRECTcut deleted the check-if-image-loaded-without-errors branch October 20, 2020 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants