Browse Source

note about require.id configurability

pull/20/head
Sami Vaarala 11 years ago
parent
commit
cc145d8332
  1. 6
      src/duk_bi_global.c

6
src/duk_bi_global.c

@ -979,8 +979,10 @@ duk_ret_t duk_bi_global_object_require(duk_context *ctx) {
/* Fresh require: require.id is left configurable (but not writable)
* so that is not easy to accidentally tweak it, but it can still be
* done with Object.defineProperty(). (This could also be just made
* non-configurable, as there is no practical reason to touch it.)
* done with Object.defineProperty().
*
* XXX: require.id could also be just made non-configurable, as there
* is no practical reason to touch it.
*/
duk_push_c_function(ctx, duk_bi_global_object_require, 1 /*nargs*/);
duk_dup(ctx, 3);

Loading…
Cancel
Save