<!DOCTYPE HTML>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="author" content="Mauricio Lauffer">
  <title>sap.ui.core.Fragment.load is not async</title>
</head>
<body class="sapUiBody" role="application">
<script id="sap-ui-bootstrap"
        src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
        data-sap-ui-async="true" data-sap-ui-oninit="boot"
        data-sap-ui-language="en"
        data-sap-ui-resourceroots='{"mlauffer.fragment.load": "./"}'>
</script>
<script>
  function boot() {
    'use strict';
    sap.ui.require(['sap/ui/core/Fragment'],
      function (Fragment) {
        console.dir(Fragment);
        //Just to postpone it a little bit more and make sure everything has been loaded
        setTimeout(function() {
          //Just to postpone it a little bit more and make sure everything has been loaded
          Promise.all([
            Fragment.load({name: 'mlauffer.fragment.load.Dummy', type: 'XML'}),
            Fragment.load({name: 'mlauffer.fragment.load.Dummy', type: 'XML'}),
            Fragment.load({name: 'mlauffer.fragment.load.Dummy', type: 'XML'}),
            Fragment.load({name: 'mlauffer.fragment.load.Dummy', type: 'XML'})
          ]).then(console.dir);
        }, 500)
      });
  }
</script>
</body>
</html>
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:html="http://www.w3.org/1999/xhtml">
	<html:div>Fragment async test...</html:div>
</core:FragmentDefinition>