handle both regular and frame eventHooks

[#47596415]

Fixed EnergyGraph in non-iframe embedding mode.