1

I would like to check supportability for the ellipsis overflow , not by querying the browser type or version. Is that possible?

I know that firefox versions < 7 are not supporting this.

thanks, Tal

Tal
  • 1,773
  • 4
  • 18
  • 20

2 Answers2

3

Didn't try such approach but this may work:

function checkEllipsis() {
  var d = document.createElement('div');
  if(typeof d.style.textOverflow == 'undefined')
    return false;
  d.style.textOverflow = 'ellipsis';
    return d.style.textOverflow == 'ellipsis';
}
Eugene
  • 3,280
  • 21
  • 17
  • Interesting...i'll try that one. question is whether unsupported browsers may take the textOverflow but not use it. – Tal Aug 19 '12 at 13:16
1

CanIUse is a very helpful site for checking browser support - http://caniuse.com/#search=ellipsis.

Don't know how you can test if a browser supports something without testing which browser it is?! This thread covers a similar topic and may be of use.

Community
  • 1
  • 1