Update web-platform-tests to revision 697b971060b2d475a73c1c3755232a4674d61cf5

This commit is contained in:
Ms2ger 2016-05-10 11:29:19 +02:00
parent f60598909a
commit b97474fbba
236 changed files with 4817 additions and 893 deletions

View file

@ -107,11 +107,22 @@ function createElement(tagName, attrs, parent, doBindEvents) {
// We set the attributes after binding to events to catch any
// event-triggering attribute changes. E.g. form submission.
setAttributes(element, attrs);
//
// But be careful with images: unlike other elements they will start the load
// as soon as the attr is set, even if not in the document yet, and sometimes
// complete it synchronously, so the append doesn't have the effect we want.
// So for images, we want to set the attrs after appending, whereas for other
// elements we want to do it before appending.
var isImg = (tagName == "img");
if (!isImg)
setAttributes(element, attrs);
if (parent)
parent.appendChild(element);
if (isImg)
setAttributes(element, attrs);
return element;
}