Put js into createDataTreeMap() which can be invoked from main document.