def m_setPointerCapture(self): return "%s.pointerId" % r.Element()
def m_showModal(self): return r.choice(["", r.Element(), r.EvtObj()])
def m_hasAttributeNS(self): namespaceURI = r.URI() localName = ("%s.localName") % r.Element() return "'%s', %s" % (namespaceURI, localName)
def m_releasePointerCapture(self): return "%s.pointerId" % r.Element()
def m_replaceWith(self): node = r.Element() text = r.DOMString(r.zint(256)) return r.choice(["'%s'" % text, node])
def m_getElementsByTagNameNS(self): namespaceURI = r.URI() localName = ("%s.localName") % r.Element() return "'%s', %s" % (namespaceURI, localName)
def m_before(self): node = r.Element() text = r.DOMString(r.zint(256)) return r.choice(["'%s'" % text, node])
def m_querySelectorAll(self): # 找出所有匹配的节点并返回数组 selectors = randoms.choice( [randoms.HTMLTags(), randoms.Element(), "*"]) return "'%s'" % selectors
def m_querySelector(self): # 找到一个后就返回节点对象 selectors = randoms.choice( [randoms.HTMLTags(), randoms.Element(), "*"]) return "'%s'" % selectors
def m_queryAll(self): n = randoms.choice([randoms.HTMLTags(), randoms.Element(), "'*'"]) return "'%s'" % n
def m_prepend(self): # 将指定元素插入匹配元素内部的开头 node = randoms.Element() text = randoms.DOMString(randoms.zint(256)) return "'%s'" % randoms.choice([node, text])