当前位置:网站首页>Browser independent way to detect when image has been loaded
Browser independent way to detect when image has been loaded
2022-06-23 01:39:00 【javail】
problem :
In IE, you can onreadystatechange. stay IE in , You can onreadystatechange.There's onload, but I read scary things . Loaded , But I read Something terrible .jQuery wraps up the DOM's load event quite nicely with "ready".jQuery use “ be ready ” Well packed DOM Load events for .It seems likely I am just ignorant of another nice library's implementation of image loading. I just don't seem to know the image loading implementation of another good library .
The context is that I am generating images dynamically (via server callbacks) that can take some time download. Context is that I dynamically generate images ( Callback through the server ), It may take some time to download .In my IE-only code I set the src of the img element, then when the onreadystatechange event fires with the "complete" status, I add it to the DOM so the user sees it. In my IE-only In the code , I set up img Elemental src, Then when onreadystatechange Events to “ complete ” When the status is triggered , I added it to DOM, So that users can see it .
I'd be happy with a "native" JavaScript solution, or a pointer to a library that does the work. I am right. “ Native ”JavaScript Satisfied with the solution or the pointer to the library that performs the work .There's so many libraries out there and I'm sure this is a case of me just not knowing about the right one. There are many libraries there , I'm sure this is the case that I don't know the right Library .That said, we're already jQuery users, so I'm not eager to add a very large library just to get this functionality. in other words , We are already jQuery The user , So I'm not in a hurry to add a very large library to get this functionality .
Solution :
Reference resources : https://stackoom.com/en/question/3RiG边栏推荐
- Using WordPress to create a MySQL based education website (learning notes 2) (technical notes 1) xampp error1045 solution
- [Luogu] P2887 Sunscreen G
- Pat class A - 1014 waiting in line (bank queuing problem | queue+ simulation)
- Autumn move script C
- Ansible learning summary (8) -- Summary of ansible control right raising related knowledge
- A blog allows you to understand the use of material design
- The road of architects starts from "storage selection"
- Explain the startup process of opengauss multithreading architecture in detail
- Wallys/DR7915-wifi6-MT7915-MT7975-2T2R-support-OpenWRT-802.11AX-supporting-MiniPCIe
- Huawei cloud recruits partners in the field of industrial intelligence to provide strong support + commercial realization
猜你喜欢

Explain the startup process of opengauss multithreading architecture in detail

3D打印微组织

Express framework installation and start service

Installation record of ros1noetic in Win 11

JMeter associated login 302 type interface

MySQL -- how to access the database of a computer in the same LAN (prenatal education level teaching)

SQL programming task04 job - set operation

Debian10 configuring rsyslog+loganalyzer log server

07 project cost management

office2016+visio2016
随机推荐
Char[], char *, conversion between strings
C language student achievement ranking system
Pat a - 1010 radical (thinking + two points)
Up the Strip
C# SerializableDictionary序列化/反序列化
Debian10 LVM logical volumes
Do you know the memory components of MySQL InnoDB?
C. Number of Pairs-Codeforces Round #725 (Div. 3)
[22 summer reconstruction 1] codeworks round 791 (Div. 2)
人民币的单位的大写
Extend your kubernetes API using the aggregation API
Nuxt - auto generate dynamic route bug
C#.NET万能数据库访问封装类(ACCESS、SQLServer、Oracle)
Yyds dry goods counting tail recursion is better than recursion
JS prototype and prototype chain Paramecium can understand
Questions not written in the monthly contest
[hdu] p2087 cut cloth strip
Sélecteur de hiérarchie
Get the start and end dates of the current week
崔鹏团队:万字长文梳理「稳定学习」全景图
