Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7779481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:38:59+00:00 2026-06-01T18:38:59+00:00

There’s a question that looks like this one here: Create my own classList object

  • 0

There’s a question that looks like this one here:
Create my own classList object when the browser does not implement it itself
The problem is that the answer works in some browsers but does not work in IE7 and in flock (at least).
So I’d like to have an alternative that works with these browsers.
What I want is simple but I believe it’s not simple to implement.
I want to be able to apply this code to any browser build from the time that IE7 or FF 3.0 was build:

var select = document.createElement('select');
select.classList.add('guestSelect');

How can I accomplish that?
Note that I don’t want to use any frameworks or any libraries. I want to be the one to write the code!
I’d like to do it this way specially because I want to learn how to accomplish these kinds of things.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:39:00+00:00Added an answer on June 1, 2026 at 6:39 pm

    Maybe you don’t need this answer anymore, but other may still be looking for it.

    Since IE7 doesn’t implement the Element class, you can’t extend its prototype. The best you can do is to create your own element class that wraps DOM elements, and use it everywhere. That’s what most frameworks do, by the way.

    Mind you, this could dramatically change the code you’ve already written.
    That’s why it’s better (simpler?) to rely on global functions like addClass(element, "foo");.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There seems to be a similar question to this on here but with the
There are several shading languages available today like GLSL, HLSL, CG, which one to
There is no doubt that MonoTouch is one of the great cross-compiler(s). Similarly, SenchaTouch
There are things like f.call(...) f.apply(...) But then there's this (1, alert)('Zomg what is
There are lots of posts on here about moving a folder out of one
There exists an RSS feed with over 1000 items. I want to create a
There is nothing like the 43rd day of your life spent tracking down issues
For some reason, after submitting a string like this Jack’s Spindle from a text
There will be 500+ threads concurrently uploading an unique object to a bucket all
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.