4 ms·
But sometimes I need to use code that I couldn't write myself. An example: you can send an XmlHttpRequest to a different port on the same domain in Firefox, bu
by lacker 18y ago
But sometimes I need to use code that I couldn't write myself.
An example: you can send an XmlHttpRequest to a different port on the same domain in Firefox, but only if first you add the line
document.domain = document.domain;
Now, I wouldn't expect to be able to figure that out myself. So I just copy and paste, add a comment saying that this is a bit of magic that makes cross-port xhr's work in firefox, and add the url I got it from in the comment. Doesn't that seem reasonable?
- tumult 18y agoYes, it does. We don't need some GUID standard for stuff like this, as advocated by the article. Your example is fine.