public void Dispose(JSWrapper et)
        {
            try
            {
                Element e = et.As <Element>();
                WAContext.SetAtomControl(e, null);
                WAContext.SetLogicalParent(e, null);
                WAContext.SetTemplateParent(e, null);

                //if (e is Page page)
                //{
                //    // we need to remove this page if the page is on the stack...
                //    try
                //    {
                //        // WAContext.(page);
                //    }
                //    catch (Exception ex)
                //    {
                //        System.Diagnostics.Debug.WriteLine(ex);
                //    }
                //}
            }
            catch (Exception ex) {
                System.Diagnostics.Debug.WriteLine(ex);
            }
        }
        public void AttachControl(JSWrapper target, JSValue control)
        {
            Element element = target.As <Element>();
            var     ac      = WAContext.GetAtomControl(element);

            if (ac != null)
            {
                if (ac == control as object)
                {
                    return;
                }
                throw new InvalidOperationException("Control already attached");
            }
            WAContext.SetAtomControl(element, control);
        }