Is there a way to determine the context a form is being used?

Is there a way to determine the context a form is being used?

In other words, in Deluge, can I tell if the form is running natively or is embedded in an iframe?