```javascript
var blockParent = element.querySelector(parentSelector);
if (blockParent) {
  blockParent.appendChild(block);
}
```