Balson: Hagb4rd: if objects were p***ed by reference, this would work: function nullifyx { x = null; }; var someObject = {}; nullifysomeObject; ***ertsomeObject == null
Deida: Hagb4rd: again, they have fairly particular and useful meanings, and they’re distinct from “p***ing a reference”
Forrister: Hagb4rd: otherwise PHP and C++ wouldn’t have a good way to describe the potential call semantics they actually have.
Nowitzke: Hagb4rd: PHP and C++ have a particular mechanism that doesn’t exist in JS, and it’s called “p***-by-reference” or “call-by-reference”
Icard: P***ing by reference != p***ing the reference
Bente: I had this debate quite a few times already
Yahn: Nasalroad: Wow! It worked! Thanks! It’s still really hard for me to understand this “promise” stuff =P
Chaberek: Can anyone please help me with this? http://hastebin.com/afuvumikov.avrasm It crashes when I try to run it, the last two lines are what do it. Is there a better way to do this?
Caraig: Im just trying to convert a string from a text field into a double
Nasalroad: Rush2112, what kind of javascript is that ?
Dewit: I meant to join the java channel, aaargh
Khim: Hey all, I need help please. I put the following javascript in a file.js being called from a custom module. Does anyone have any idea why this won’t run? Yet it’s loaded. Drupal 6. http://pastebin.com/pJ4zvHgt
Mcvenes: Error msg says: “Uncaught TypeError: Cannot read property ‘tracker_name’ of undefined”
Mcelligott: Window.totango_options is undefined
Nasalroad: Jumoke, don’t you need to run it with at the last line ?
Shertzer: Window.totango_options is working – i had to separate that out since this function was the problematic one
Chieffo: So, writing a simple replacement for Object.is for ES5 compatibility. Does this look kosher? function Object_isa, b { return a === b ? a !== 0 1 / a === 1 / b : a !== a && b !== b; }
Zema: Gilgameshkun, check es6-shim
Reifler: Oh, because it would have a proper example in it?
Gladin: This? — https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js
Thake: I don’t find Object.is. A lot of Object.isFrozen, Object.isSealed, etc.
Gorrill: Please see the full function here: http://pastebin.com/VnRc0tAN I get Error msg says: “Uncaught TypeError: Cannot read property ‘tracker_name’ of undefined”
Luepke: Jslave: babel.transform”1,2,3.mapx = x * x”.code
Lillis: Hagb4rd: “use strict”;1, 2, 3.mapfunction x { return x * x;};
Brugal: Ohh.so this is the magic
Nasalroad: Mdn: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#Polyfill_for_non-ES6_browsers
Mozer: Anyway, Schaetzle, number primitives are the only types for which === behaves differently from Object.is, right?
Molfetta: No wonder they haven’t done this yet
Kohlhepp: Gilgameshkun, I think so
Cantine: Heh, this is the exact same algorithm I just wrote. XD
Iyo: Yeah your code is the same as the polyfill on mdn
Shepperdson: So my example *was* kosher.
Bonin: That’s what I was asking. :3
Few: Jumoke, where are you running this code?
Nasalroad: Jumoke, use window.totango_options = {} to be sure to be in the same scope
Klingelhoefer: All this is in a js file
Nasalroad: And remove the extra quote at line 12
Drevs: Totango_options will only be placed as part of the window object if it’s on the global scope
Wilshire: So it’s better to do what yansamo is saying, to set it up as part of the window object straight from the start
Nasalroad: Where is my second “n” ?
Aina: I swear i kept pressing tab for autocomplete
Stolzenburg: But it just didn’t work xD
Duchane: What are your thoughts on a 60 timeout when we don’t get a response from a jsonp service?