JSFiddle - React, Tailwind, and code Playground

JavaScript

var currentUrl = window.parent.location.hostname;

alert(currentUrl);