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:
parent
a01ccf458f
commit
f8dc7ff05b
@ -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();
|
||||
});
|
||||
});
|
||||
}());
|
Loading…
x
Reference in New Issue
Block a user