public function set($fx = null, $arg2 = null)
    {
        if (!is_object($fx) && !($fx instanceof Closure)) {
            throw new Exception('Error: Need to pass a function to Popup::set()');
        }

        if ($arg2) {
            throw new Exception('Only one argument is needed by Popup::set()');
        }

        $this->cb = $this->add('Callback');

        if (!$this->minWidth) {
            $this->minWidth = '120px';
        }

        if (!$this->minHeight) {
            $this->minHeight = '60px';
        }

        if ($this->cb->triggered()) {
            //create content view to pass to callback.
            $content = $this->add($this->dynamicContent);
            $this->cb->set($fx, [$content]);
            //only render our content view.
            //PopupService will replace content with this one.
            $this->app->terminate($content->renderJSON());
        }
    }