Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #34755
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: What's wrong with using a global id? |
| Date | 2018-03-02 15:05 +0100 |
| Organization | PointedEars Software (PES) |
| Message-ID | <1776626.9Ho59r5IoZ@PointedEars.de> (permalink) |
| References | <global-ids-20180225051010@ram.dialup.fu-berlin.de> <id-20180225194506@ram.dialup.fu-berlin.de> <1653812.atdPhlSkOF@PointedEars.de> <2186336.jE0xQCEvom@PointedEars.de> |
Thomas 'Ingrid' Lahn wrote:
> var proxy = new Proxy({
> Array: Array
> }, {
> get: function (target, name) {
> return (name in target)
> ? target[name]
> : document.getElementById(name);
> }
> });
>
> /* “[object Array]” (in all cases) */
> console.log(proxy.Array);
Actually, more like “function Array() { [native code] }”, because
the referred object is a Function instance, _not_ an Array instance.
> […]
--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: What's wrong with using a global id? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-02-26 14:30 +0100
Re: What's wrong with using a global id? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-02-26 14:35 +0100
Re: What's wrong with using a global id? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-03-02 15:05 +0100
Re: What's wrong with using a global id? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-02-26 20:11 +0000
csiph-web