1. Click to expand!
Peek-a-boo!
2. Click to expand!
- One
- Two
- But also
Peek-a-boo!
| (function() { | |
| // inspired by Eli Grey's shim @ http://eligrey.com/blog/post/textcontent-in-ie8 | |
| // heavily modified to better match the spec: | |
| // http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Node3-textContent | |
| if (Object.defineProperty && Object.getOwnPropertyDescriptor && | |
| Object.getOwnPropertyDescriptor(Element.prototype, 'textContent') && | |
| !Object.getOwnPropertyDescriptor(Element.prototype, 'textContent').get) { | |
| // NOTE: Neither of these "drop-in" patterns would work: | |
| // Object.defineProperty(..., ..., descriptor); // nope! |