I'd like to load the for instance the openUI5 framework into my chrome extension. So that I can use the elements and control. I found different articles here on stack overflow, but to be honest trying to reproduce the solutions didn't get me anywhere.
so I added this to my option.html file:
<!DOCTYPE html>
<html>
<head><title>My Test Extension Options</title>
</head>
<script
id="sap-ui-bootstrap"
src="/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m"
data-sap-ui-compatVersion="edge"
data-sap-ui-preload="async" >
</script>
<script>
sap.ui.getCore().attachInit(function () {
alert("UI5 is ready");
});
</script>
<script type="text/javascript" src="options.js"></script>
Favorite color:
<select id="color">
<option value="red">red</option>
<option value="green">green</option>
<option value="blue">blue</option>
<option value="yellow">yellow</option>
</select>
<label>
<input type="checkbox" id="like">
</label>
<button id="save">Save</button>
</body>
</html>
but this doesn't work because of the cross script policy of chrome. I also downloaded openUI5 and added the whole library with all .js files to my development project. What I want is to execute the following coding in my options.js file
sap.ui.getCore().attachInit(function () {
alert("UI5 is ready");
});
but that is not so easy for me. I tried loading the framework into my option.js but was not successful when doing so.