# select_tag_bug.py - Creting an html file that replicates a select tag bug regarding too many entries ### didn't need randomness, it seems to be a quantity issue ##import random ##random.seed(12345678) # initializing the seed, for replicable results. list_length = 231000 # How many option tags should there be in total # Didn't break at 4200 # Breaks at least at 42000 # Breaks at least at 23100 # at 13650 warning regarding chrome://global/content/elements/menu.js:165 , it manages to open the list if the script is left to continue # Breaks at 15000 # Breaks at 14000, although it manages to show some stuff, up to name_13713 (by using the scrollbar) # using line breaks seems to help, as at 14000 with line breaks, the warning showed up option_list = [f"" for index in range(list_length)] line_end = '' ##line_end = '\n' document = f"""
""" with open(f"select_bug_test_{'n_' if line_end != '' else ''}{list_length}.htm", mode = 'w', encoding = 'utf-8') as file: file.write(document)