def on_mouse_release(self, event):
        """Execute method of same name or open link if collides.

        Parameters
        ==========
        event (pygame.event.Event instance)

            represents data about a button of the mouse
            being pressed/released;

            we use the value of its "pos" attribute which
            represents the position of the mouse when the
            event happened to check whether an object from
            the page collided with the mouse.
        """
        ### retrieve the position of the mouse
        mouse_pos = event.pos

        ### iterate over objects

        for obj in self.objs:

            if obj.rect.collidepoint(mouse_pos):

                ### check if object is a link (has an href attribute),
                ### opening the link if it is the case

                try:
                    href = self.href

                except AttributeError:
                    pass

                else:

                    self.open_link(href)
                    break

                ### otherwise check if object has links and whether one
                ### of them collided, opening the link if it is the case

                try:
                    anchors = obj.anchor_list

                except AttributeError:
                    pass

                else:

                    for anchor in anchors:

                        if anchor.rect.collidepoint(mouse_pos):

                            self.open_link(anchor.href)
                            break

                ### otherwise check whether the object has an on_mouse_release,
                ### executing it, redrawing the elements and breaking out of
                ### the for-loop if it is the case

                try:
                    method = obj.on_mouse_release

                except AttributeError:
                    pass

                else:

                    method(event)
                    self.draw_once()
                    break

                ### regardless of what happened or not, break out of the
                ### for-loop if this point in the if-block is reached
                break
Execute method of same name or open link if collides.

        Parameters
        ==========
        event (pygame.event.Event instance)

            represents data about a button of the mouse
            being pressed/released;

            we use the value of its "pos" attribute which
            represents the position of the mouse when the
            event happened to check whether an object from
            the page collided with the mouse.
        
nodezator/htsl/main.py