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

  • Home
  • SEARCH
  • 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 182543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:57:30+00:00 2026-05-11T14:57:30+00:00

Is anyone familiar with Native Code in OS X Safari (Version 3 and WebKit)?

  • 0

Is anyone familiar with Native Code in OS X Safari (Version 3 and WebKit)? I’m using Javascript to parse some information in a form and one of my inputs is named ‘tags’. When trying to get the value of that element using:

// button is being passed through a function as a DOM object var tags = button.form.elements['tags'].value; 

Safari returns some kind of function. I’ve gotten it to alert values like ‘function tags() { [native code] }’ and Node Trees but I just can’t understand why I would be having trouble. If anyone has a clue, please let me know. I’ve gotten it to work by changing the name of the input to something else and also by iterating through all elements and using if () statements to determine whether it’s the element I want, but I’m awfully curious as to why Apple would restrict the use of any form element named ‘tags’…

P.S. – It’s test and works fine in firefox.

  • 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. 2026-05-11T14:57:30+00:00Added an answer on May 11, 2026 at 2:57 pm

    [native code] just means that it’s a function that is built in to the browser, rather than written in JavaScript. tags appears to be a WebKit extension to the DOM to allow you to get a list of elements in the form by tag name. For instance, if I run this on the StackOverflow page, I get the answer text area:

    document.getElementById('submit-button').form.elements.tags('textarea')[0] 

    The issue is that an index into a collection in JavaScript also access any object properties (including methods), so when you try to access your named element tags, you get instead the method on the elements object that WebKit defines. Luckily, there is a workaround; you can call namedItem on the elements list to get an item by id or name:

    var tags = button.form.elements.namedItem('tags').value; 

    edit: Note that its probably better to use namedItem in general even in other browsers, in case you need to retrieve an element named item or length or something like that; otherwise, if you use them as an index with the [] operator, you’ll get the built in method item or length instead of your element.

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

Sidebar

Ask A Question

Stats

  • Questions 90k
  • Answers 91k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try initializing the variable outside the class definition, here is… May 11, 2026 at 6:10 pm
  • Editorial Team
    Editorial Team added an answer I'm assuming that there's no trivial schema so you can… May 11, 2026 at 6:10 pm
  • Editorial Team
    Editorial Team added an answer Here you go: #!/usr/bin/perl -w my $file = "inner-nav.gif"; ##… May 11, 2026 at 6:10 pm

Related Questions

In a previous question, I asked whether ORM libraries were suboptimal solutions and received
Despite primarily being a windows user, I am a huge fan of rsync. Now,
Is anyone familiar with a tool that generates code stubs with meaningful names from
I'm a PHP developer who is being considered for a job implementing IdeaBank ,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.