Last active
May 19, 2017 08:01
-
-
Save askd/6a3cf9db98cb1e09127857c8872b54cb to your computer and use it in GitHub Desktop.
Test transform-style: preserve-3d support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function testPreserve3DSupport() { | |
const element = document.createElement('p'); | |
document.body.insertBefore(element, null); | |
const propName = 'transform-style'; | |
element.style[propName] = 'preserve-3d'; | |
const propValue = window.getComputedStyle(element, null).getPropertyValue(propName); | |
document.body.removeChild(element); | |
return (propValue === 'preserve-3d'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment