The documentation says append() accepts:
- string
- Element
- jQuery collection
The problem is there's no official way to append a text node in jQuery. Using append() with a text node works just fine, but Text is not an instance of Element, it's an instance of its parent prototype, Node.
The way this is documented echoes in other tools and definitions like Definitely Typed's jQuery TypeScript .d.ts definition, where the TypeScript compiler throws an error when I'm appending a text node.
Please fix this in the documentation so it can trickle downstream into our tooling. Thanks :-)
The documentation says append() accepts:
The problem is there's no official way to append a text node in jQuery. Using append() with a text node works just fine, but Text is not an instance of Element, it's an instance of its parent prototype, Node.
The way this is documented echoes in other tools and definitions like Definitely Typed's jQuery TypeScript .d.ts definition, where the TypeScript compiler throws an error when I'm appending a text node.
Please fix this in the documentation so it can trickle downstream into our tooling. Thanks :-)