Didn't think to use that, code does that now.  However, selection.text results in a C++ level assert when the context menu is invoked on a button.  The code checks for that.  Without that check, e.g. this unit test:

    cfx test -f test-context-menu:testPredicateContextButtonIsNotEditable

results in this error:

```
console.error: addon-sdk: 
  Message: [Exception... "Failure"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/XPIProvider.jsm -> jar:file:///tmp/tmpPQwKeX.mozrunner/extensions/15c69b94-baba-45b5-9557-138326fd8204@jetpack.xpi!/bootstrap.js -> resource://extensions.modules.15c69b94-baba-45b5-9557-138326fd8204-at-jetpack.commonjs.path/toolkit/loader.js -> resource://extensions.modules.15c69b94-baba-45b5-9557-138326fd8204-at-jetpack.commonjs.path/sdk/selection.js :: getElementWithSelection :: line 318"  data: no]
```