Exemplo n.º 1
0
        protected override void CallDirectEventSubscribers(Event evt)
        {
            base.CallDirectEventSubscribers(evt);

            if (evt.Type == "click" && !evt.IsDefaultPrevented() && evt.Bubbles)
            {
                var href = Href.Trim();
                if (!href.StartsWith("JavaScript"))
                {
                    return;
                }

                var idx = href.IndexOf(':');
                if (idx < 0 || idx == href.Length - 1)
                {
                    return;
                }

                var code = href.Substring(idx + 1);


                //todo: call async
                OwnerDocument.HandleNodeScript(evt, code, true);
            }
        }
Exemplo n.º 2
0
 public ATag(int index, string tagHtml, int begin)
     : base(index, tagHtml, begin)
 {
     if (string.IsNullOrEmpty(Href) || emptyHref.IsMatch(Href.Trim()))
     {
         isEmptyHref = true;
     }
 }