support for headless, XDM and preselection in Draw.js