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 6539821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:54:17+00:00 2026-05-25T10:54:17+00:00

I was playing with node.js and I came into a problem, that I cannot

  • 0

I was playing with node.js and I came into a problem, that I cannot solve in any way. On the server side I have some objects, that provide public interface for managing them. But the problem is that in this interface I have functions, that are not accesible when returned to frontend. Anyone knows what am I doing wrong or why is that a feature and not a bug ?
Sample test code on server side:

socket.on('F-test', function(){
    var o1 = {
        A: 5
    };

    var o2 = function(){
        this.A = function(){
            return 5;
        }
    };

    var o3 = function(){
        var A = function(){
            return 5;
        }

        return {
            'A': A
        }
    };

    var o4 = function(){
        var that = this;
        that.A = function(){
            return 5;
        }

        return that;
    };

    var o5 = {
        A: function(){
            return 5;
        }
    };

    socket.emit('B-test', {o1: o1, o2: new o2(), o3: new o3(), o4: new o4(), o5: o5});
});

And in the console I get :

enter image description here

Hosting is provided by no.de (Joyent);

  • 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-05-25T10:54:18+00:00Added an answer on May 25, 2026 at 10:54 am

    The problem is that Functions don’t serialize. Only properties will serialize.

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

Sidebar

Related Questions

I am playing around with Hadoop and have set up a two node cluster
I've been playing with a div I have that changes on a user action.
I've been playing around with GEdit's syntax highlighting. I love the way that Visual
I'm playing with Remote Actors but I'm facing some difficulties. Consider this server: object
I have been playing around with node.js, and coming from a Java background, I
I'm just getting into RSpec and playing around a bit with some easy examples
I'm playing with the node-sqlite3 package and ran into a strange situation. This simple
I setup a HTML5 page, that include a node. The page will to playing
Playing with log4net, I have seen the possibility to use a per-thread stack of
I have been playing with the Ruby library shoes. Basically you can write a

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.