4 ms·
He's right about this rightfully being a node method rather than a document method. But if the common developer can't understand bit flags, I don't think they a
by prodigal_erik 17y ago
He's right about this rightfully being a node method rather than a document method. But if the common developer can't understand bit flags, I don't think they are going to have a long career. And I can't think of a good reason to use entityReferenceExpansion=false unless you're going out of your way to handle entities yourself (which he's clearly not inclined to do).
- jeresig 17y agoThe common developer or the common web developer? I think most web developers can go very far without ever using bit flags - especially considering that no common JavaScript or DOM APIs use them. "And I can't think of a good reason to use entityReferenceExpansion=false..." It's all about the element of least surprise - are developers more likely to expect the syntax that they see on the page (e.g. &foo;) or something else in its place. Whatever the right answer is to that question should be made the default option and left as that.
- michael_h 17y agoI'm not a web developer, but I do like javascript quite a bit. The 'bit flags' are easily understandable, but they don't 'feel' like a Javascript API -> I think that was the point of the post. All things being equal, jresig's proposed API feels a lot more natural to a javascript developer. In another language, this API may fit right in.