Astro.eventManager.on('initInstance', function() {
  var doc = this;

  // Object for storing references of related objects.
  doc._references = {};
});

@@ -20,20 +20,18 @@
 on('
-initInstance
+beforeInit
 ', f

Use beforeInit event