Widgets do not run in the background. A widget is a small piece of code that is displayed on a web page or in an app. When you click on a widget, the widget's code runs in the context of the web page or app where it is displayed.