<commit_before>class FormPanel(SimplePanel):
    # FormPanelImpl.hookEvents
    def hookEvents(self, iframe, form, listener):
        # TODO: might have to fix this, use DOM.set_listener()
        self._listener = listener
        if iframe:
            mf = get_main_frame()
            self._onload_listener = mf.addEventListener(iframe, "readystatechange",
                                                        self._onload)

        self._onsubmit_listener = mf.addEventListener(form, "onsubmit",
                                                    self._onsubmit)

    # FormPanelImpl.unhookEvents
    def unhookEvents(self, iframe, form):
        # these might be wrong, need testing.
        iframe.removeEventListener("readystatechange", self._onload_listener, True)
        form.removeEventListener("onsubmit", self._onsubmit_listener, True)
<commit_msg>whoops, should be submit not onsubmit, results in callback attempted on ononsubmit<commit_after>class FormPanel(SimplePanel):
    # FormPanelImpl.hookEvents
    def hookEvents(self, iframe, form, listener):
        # TODO: might have to fix this, use DOM.set_listener()
        self._listener = listener
        if iframe:
            mf = get_main_frame()
            self._onload_listener = mf.addEventListener(iframe, "readystatechange",
                                                        self._onload)

        self._onsubmit_listener = mf.addEventListener(form, "submit",
                                                    self._onsubmit)

    # FormPanelImpl.unhookEvents
    def unhookEvents(self, iframe, form):
        # these might be wrong, need testing.
        iframe.removeEventListener("readystatechange", self._onload_listener, True)
        form.removeEventListener("submit", self._onsubmit_listener, True)

{'fraction_non_alphanumeric': 0.08133704735376045, 'fraction_numerical': 0.0, 'mean_word_length': 2.1843971631205674, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1361519', 'n_tokens_mistral': 463, 'n_tokens_neox': 440, 'n_words': 105}