зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1141498
, part 2 - Enable calls to DOM animation test's testcommon.js's addDiv() to set attributes. r=dholbert
This commit is contained in:
Родитель
dd4fe529bd
Коммит
f8082bd161
|
@ -7,9 +7,17 @@
|
|||
* @param t The testharness.js Test object. If provided, this will be used
|
||||
* to register a cleanup callback to remove the div when the test
|
||||
* finishes.
|
||||
*
|
||||
* @param attrs A dictionary object with attribute names and values to set on
|
||||
* the div.
|
||||
*/
|
||||
function addDiv(t) {
|
||||
function addDiv(t, attrs) {
|
||||
var div = document.createElement('div');
|
||||
if (attrs) {
|
||||
for (var attrName in attrs) {
|
||||
div.setAttribute(attrName, attrs[attrName]);
|
||||
}
|
||||
}
|
||||
document.body.appendChild(div);
|
||||
if (t && typeof t.add_cleanup === 'function') {
|
||||
t.add_cleanup(function() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче