mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-19 12:52:11 +01:00
Update media/src/core/core.sizing.js
Use document.body rather than document.getElementsByTagName (Makes things consistent with the rest of the codebase and should be faster) http://jsperf.com/document-body-vs-document-getelementsbytagname-body-0
This commit is contained in:
parent
59dc2aed9c
commit
ef1c0890df
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a CSS unit width to pixels (e.g. 2em)
|
* Convert a CSS unit width to pixels (e.g. 2em)
|
||||||
* @param {string} sWidth width to be converted
|
* @param {string} sWidth width to be converted
|
||||||
@ -15,7 +14,7 @@ function _fnConvertToWidth ( sWidth, nParent )
|
|||||||
|
|
||||||
if ( !nParent )
|
if ( !nParent )
|
||||||
{
|
{
|
||||||
nParent = document.getElementsByTagName('body')[0];
|
nParent = document.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
var iWidth;
|
var iWidth;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user