Comments (4)
Sorry, but which loop are you referring to? init()
is called by the browser when the element is ready (oncontentready
) or if the document is ready (ondocumentready
), or if the element is already ready when the polyfill code is executed (element.readyState === "complete"
).
from background-size-polyfill.
For example here (file: backgroundsize.htc):
function loop() {
processSnapshotId = window.setTimeout( function() {
expando.processing = false;
processSnapshot( element, expando );
}, 0 );
}
from background-size-polyfill.
loop()
is called after processSnapshot()
is finished, in case takeSnapshot()
was called (triggered by a property change on the target element) while processSnapshot()
was running. (A "snapshot" is a record of all the relevant properties of the target element, takeSnapshot()
makes this record, processSnapshot()
adjusts the background div in response to the record.) At this point, the target element has been found.
Though, if the target element is modified rapidly, then processSnapshot()
may be called continuously; adding a delay in the process may be beneficial (at the expense of fast updates for animation).
Can you post a test case? It would help to confirm the issue.
from background-size-polyfill.
Hmm ... this must be the hardest test case. I tried this ... but if i execute this code, Internet Explorer hang up due to memory problem.
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
* {
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size: contain;
-ms-behavior: url(backgroundsize.min.htc);
behavior: url(backgroundsize.min.htc);
}
.divClassWithImage {
background-image: url(test.jpg);
}
.divClassWithoutImage {
background-image: none;
}
</style>
</head>
<body>
<div class="divClassWithoutImage"></div>
<div class="divClassWithImage"></div>
...
<div class="divClassWithoutImage"></div>
</body>
</html>
from background-size-polyfill.
Related Issues (20)
- Background-size-polyfill doesn't work with pseudo elements :after and :before HOT 3
- JSP sites not working HOT 1
- Breaks entire page/site when used with Microsoft Azure Servers HOT 2
- background-attachment:fixed stop working in IE8
- broken by certain doctypes?
- Is this really work in IE8 just with adding -ms-behavior? HOT 17
- 請問是否可以兼容IE7/IE6 HOT 3
- When is the polyfill executed? How to refresh? HOT 3
- Is doesnt work HOT 3
- Background Polyfill conflict with selectivizr.js
- Will this work in LESS?
- Causes mixed content warnings on secure pages. HOT 1
- IE HOT 2
- IE8 transparent background color
- Sass and frozen links
- Wrong size and position for generated IMG
- Just doesnt work - update until you resize browser HOT 3
- IE8: Does not work with elements with "display:none;" on page load, which are later shown with javascript HOT 2
- Do I need the src folder?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from background-size-polyfill.