Skip to content

change v8 typeof oporator to return 'object' instead of 'function' on host objects. #62

@dirkelfman

Description

@dirkelfman

Is there a way to change typeof [HostObject] to return 'object' instead of 'function' .

        public class TestClass
        {
            public string Name { get; set; }
        }

        [TestMethod, TestCategory("V8ScriptEngine")]
        public void V8_typeof()
        {
            var testClass = new TestClass() { Name = "lisa" };
            engine.AddHostObject("testClass", testClass);
            Assert.AreEqual("object", (string)engine.Evaluate("typeof testClass"));
        }

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions