# File lib/html5/filters/validator.rb, line 801
  def eof
    for token in @things_that_point_to_an_id
      tag_name = token.fetch(:name, "").downcase
      attrs_dict = token[:data] # by now html5parser has "normalized" the attrs list into a dict.
                    # hooray for obscure side effects!
      attr_value = attrs_dict.fetch("contextmenu", "")
      if attr_value and (!@ids_we_have_known_and_loved.include?(attr_value))
        yield( {:type => "ParseError",
             :data => "id-does-not-exist",
             :datavars => {"tagName" => tag_name,
                  "attributeName" => "contextmenu",
                  "attributeValue" => attr_value}})
      else
        for ref_token in @things_that_define_an_id
          id = ref_token.fetch(:data, {}).fetch("id", "")
          if not id
            continue
          end
          if id == attr_value
            if ref_token.fetch(:name, "").downcase != "men"
              yield( {:type => "ParseError",
                   :data => "contextmenu-must-point-to-menu"})
            end
            break
          end
        end
      end
    end
  end