require(["webjars/xwiki-platform-tree-webjar/7.3/require-config.min.js"], function() {
  require(['tree'], function($) {
    $('.xtree').xtree().one('ready.jstree', function(event, data) {
      var tree = data.instance;
      var openToNodeId = tree.element.attr('data-openTo');
      // Open the tree to the specified node and select it.
      openToNodeId && data.instance.openTo(openToNodeId);
    });
  });
});
