Skip to content

Image loading and error handling #91

Description

@hkvstore

I'd like to report 2 issues I found when playing with this excellent script:

  1. The script will insert image tag into <head>. Since the onload/onerror events will be fired after setting src, it might be better not to append the image to <head>.

  2. I accidentally passed a blank array as paths to loadjs(), it could pass the loadFiles() without firing callbackFn(), the subsequent loading process was therefore skipped. It would be nice if some error handling about that can be added.

Thank you for creating such a good script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions