1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-01-30 23:38:47 +01:00

DOMRect: added test for range functions

This commit is contained in:
kkapsner 2018-09-05 16:56:34 +02:00
parent a01ccf458f
commit f8dc7ff05b

View File

@ -58,11 +58,21 @@
performTest();
}
iframe.addEventListener("load", function(){
createTest("getClientRects", function(element){
createTest("Element.getClientRects", function(element){
return element.getClientRects()[0];
});
createTest("getBoundingClientRect", function(element){
createTest("Element.getBoundingClientRect", function(element){
return element.getBoundingClientRect();
});
createTest("Range.getClientRects", function(element){
var range = document.createRange();
range.selectNode(element);
return range.getClientRects()[0];
});
createTest("Range.getBoundingClientRect", function(element){
var range = document.createRange();
range.selectNode(element);
return range.getBoundingClientRect();
});
});
}());