Skip to content

Commit 6510542

Browse files
author
Mark Pilgrim
committed
added support for validating draggable attribute
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40980
1 parent 10f627a commit 6510542

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/html5lib/filters/validator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@ def validateAttributeValueContenteditable(self, token, tagName, attrName, attrVa
365365
def validateAttributeValueDir(self, token, tagName, attrName, attrValue):
366366
for t in self.checkEnumeratedValue(token, tagName, attrName, attrValue, frozenset(('ltr', 'rtl'))) or []: yield t
367367

368+
def validateAttributeValueDraggable(self, token, tagName, attrName, attrValue):
369+
for t in self.checkEnumeratedValue(token, tagName, attrName, attrValue, frozenset(('true', 'false'))) or []: yield t
370+
368371
def checkEnumeratedValue(self, token, tagName, attrName, attrValue, enumeratedValues):
369372
if not attrValue and ('' not in enumeratedValues):
370373
yield {"type": "ParseError",

0 commit comments

Comments
 (0)