The ol/ext/IFrameAPI lets you embed an ol map on your website and control the map using JavaScript.
It is a bidirectional API communication between parent window and map iframe.
You don't need to include Openlayers js or css in your main page,
just add the
API code and embed the widget (as an IFrame)...
The API provides a controlled mechanism to securely (if used properly) access script from different orign in you page.