feat: optimize canvas image render load#163
Conversation
|
Taking a flight in some minutes. I will review your PR later but please if possible check your auto lint code because there are many style changes that interfere with your proposal. Thank you again! |
Apart from what I mentioned above, the remaining content are automatically formatted by the IDE plugin (our company enforces this practice). In fact, if you don’t mind, I’d like to set up a formatting tool for snapDOM as well. I’ve encountered numerous inconsistencies in indentation and other formatting issues while reading the code, which has left me quite confused. Wishing you a pleasant flight. |
tinchox5
left a comment
There was a problem hiding this comment.
The timeout is set because of a very Safari way to resolve a kind of lazy encoding. It is not related with onload. Nevertheless I will test it because it would be nice if it is working consistently. Regarding format style I prefer to not make changes until I rewrite most of current code as is planned in the roadmap.
Thank you for your clarification! It seems I did have some misunderstandings. Many behaviors of Safari have been quite frustrating for me. The code does run normally on my device, but I can't rule out the possibility that this is a coincidental success due to environmental issues. I will do more tests on different devices later to ensure it works properly. |
|
Yeah Safari is frustrating for me too 😅 |
await new Promise(resolve => setTimeout(resolve, 100));is confused, and this depend on networks so sometimes takes no effect. I replaced this logic with anonLoadevent callback to handle this issue.appendvariable is redundant.