Skip to content

Instantly share code, notes, and snippets.

@Gekkio
Created June 2, 2016 11:16
Show Gist options
  • Save Gekkio/a148a0ab2d651f77b6367804645d3777 to your computer and use it in GitHub Desktop.
Save Gekkio/a148a0ab2d651f77b6367804645d3777 to your computer and use it in GitHub Desktop.
(function() {
var result = [];
function visitElement(el, parentStyle) {
var style = window.getComputedStyle(el);
if (parentStyle.display === '-ms-flexbox' && style.display === 'inline') {
result.push(el);
}
for (var i = 0; i < el.children.length; i++) {
visitElement(el.children[i], style);
}
}
visitElement(window.document.documentElement, {});
console.log('Flexbugs #12: ' + result.length + ' elements');
result.forEach(function(el) {
console.error(el.nodeName + ' id=' + el.id + ' class=' + el.className);
});
window.flexbugs_12 = result;
console.log('See window.flexbugs_12');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment