I'm doing this in background script:

`var link = document.createElement('div');`

Then link is null. I guess it's because extensions background page have no DOM, or am i have no access to it?
Anyway i'm need this to make copy to clipboard. Here part where i'm try to use it:

```
function selectionOnClick(info, tab) {
    var link = document.createElement('div');
    var range = document.createRange();

    link.innerHTML = ShortURL(info.selectionText);
    range.selectNode(link);

    window.getSelection().addRange(range);

    try {
        var successful = document.execCommand('copy');
        if (!successful) {
            alert("Your browser doesn't support copy to clipboard.");
        }
    } catch(err) {
        alert("Your browser doesn't support copy to clipboard.");
    }

    window.getSelection().removeAllRanges();
    link.parentNode.removeChild(link);
}

chrome.contextMenus.create({'title': 'Short selected', 'contexts':['selection'], 'onclick':selectionOnClick});

```