Sha256: be8f80331f5bf376b625b5f53218e0517672859a425b09b74344a58e7e0c4073
Contents?: true
Size: 553 Bytes
Versions: 5
Compression:
Stored size: 553 Bytes
Contents
'use strict'; require('../common'); var assert = require('assert'); var vm = require('vm'); var symbol = Symbol(); function Document() { this[symbol] = 'foo'; } Document.prototype.getSymbolValue = function() { return this[symbol]; }; var context = new Document(); vm.createContext(context); assert.equal(context.getSymbolValue(), 'foo', 'should return symbol-keyed value from the outside'); assert.equal(vm.runInContext('this.getSymbolValue()', context), 'foo', 'should return symbol-keyed value from the inside');
Version data entries
5 entries across 4 versions & 1 rubygems