7575 'src' , 'srcset' , 'useMap' , 'vspace' , 'width' },
7676 # TODO: input->formAction, formEnctype default to current url but we don't know it
7777 # TODO: input->list default is null
78- # TODO: input->maxLength throws exception when negative value instead of default
7978 # TODO: input->size seems to have some sort of default value in firefox (20?)
8079 # TODO: input->size is an integer through dot-access, also throws exception on invalid value
8180 # TODO: input->size has a minimum value of 1
@@ -345,7 +344,7 @@ def _DOMTokenList_type(*args):
345344 return DOMTokenList
346345
347346
348-
347+ # IndexSizeError - Singleton for the IndexSizeErrorException type
349348IndexSizeError = IndexSizeErrorException ()
350349
351350# TODO: Send firefox some bug reports based on below info
@@ -361,7 +360,6 @@ def _DOMTokenList_type(*args):
361360 'rowSpan' : lambda em : convertToIntRangeCapped (em .getAttribute ('rowspan' , 1 ), minValue = 0 , maxValue = 65534 , invalidDefault = 0 ),
362361 'hspace' : lambda em : convertToPositiveInt (em .getAttribute ('hspace' , 0 ), invalidDefault = 0 ),
363362 'vspace' : lambda em : convertToPositiveInt (em .getAttribute ('vspace' , 0 ), invalidDefault = 0 ),
364- # maxLength needs to throw exception on invalid
365363 'maxLength' : _special_value_maxLength ,
366364 # size throws exception on invalid value, and a minimum of 1
367365 'size' : _special_value_size ,
@@ -380,6 +378,9 @@ def _DOMTokenList_type(*args):
380378
381379}
382380
381+
382+ # TAG_ITEM_ATTRIBUTES_SPECIAL_VALIDATION - These perform a validation step when setting the value via AdvancedTag.${NAME} = something
383+ # Key should be the . access name, value is a function/lambda which takes the element as first argument, and the new value as the second argument.
383384TAG_ITEM_ATTRIBUTES_SPECIAL_VALIDATION = {
384385 'maxLength' : _special_value_maxLength ,
385386}
0 commit comments