Perhaps we could improve performance by doing the check for `textContent`/`innerText` here outside the function call?

```
var getInnerPreTextContent = isDefined(hiddenPre.textContent) ?
    function() { return hiddenPre.textContent; } :
    function() { return hiddenPre.innerText; };

function decodeEntities(value) {
  hiddenPre.innerHTML = value.replace(/</g,'&lt');
  return getInnerPreTextContent();
}
```