Zumba_addict: the code.

Brissette: I think it will give me a good foundation on objects which is nice

Kalkman: Zumba_addict: make sure to add https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.js

Kalkman: EGreg: you have to ****yze all of the stylesheets and rules yes

Pimenta: That’s what I thought :

Arkenberg: So, what is a better technique to ‘freeze the dimensions of a container while I edit its contents’

Kalkman: Give it a fixed width and height?

Kalkman: You could calculate its offset width and height to see what they currently are

Kalkman: EGreg: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements

Felmet: Forgot to ask, why do I need es6-shim.js, is setPrototypeOf a polyfill?

Michelin: Yes but then I want to restore it back

Bredin: After the editing is done

Leier: That’s the problem! the original could have been specified in units other than px

Mendler: My solution right now is to make an element that’s 100% width inside the other element which is not to be permanently altered

Aldous: And then freeze the width of that

Tennison: And then bring it back to 100%

Byam: Or rather, I am setting its max-width and then later removing it

Kalkman: SetPrototypeOf is an es6 method zumba_addict yes

Kalkman: Es6-shim polyfills that method into browsers which don’t support it

Bivin: It works now! here is the result: https://www.dropbox.com/s/79ea4ealgkx8ezk/Screenshot%202015-09-18%2012.23.12.png?dl=0

Bassani: In case you were wondering cjohnson

Kalkman: EGreg: I would do: if node.style.width { node.dataset.oldWidth = node.style.width; } var calculatedWidth = node.offsetWidth; node.style.width = calculatedWidth;

Kalkman: And when you’re done, if node.dataset.oldWidth { node.style.width = node.dataset.oldWidth; } else { node.style.width = ”; }

Rains: I wouldn’t use dataset because IE11 doesn’t support it

Caponera: But the problem is, like I said, the offsetWidth would be in px!

Trunzo: And if the original width was in %, say

Seaward: Then it should resize with its container

Flockerzi: And after I “restore” the width, it wouldn’t do that anymore

Napp: Is this a good place to ask about the DOM? I want to get the contents of a file as a string, preferably specified as a script src=”myfile.txt”/script. Is that possible?

Crismond: So I would have broken the width of the element to which I applied tha tbehavior 😛

Athans: That’s what I was trying to avoid.

Kalkman: EGreg: exactly, you *fix* the width using the calculated offsetWidth, while you’re editing

Kalkman: And once you’re done editing, restore it to whatever it was before, including its unit % or px

Mcelhiney: Kalkman: say the original container had width: 100%

Berez: Unless I manually reproduce what the browser does, walking all the CSS rules

Callon: You can write % but not read %

Fanelli: Http://stackoverflow.com/questions/10624368/getting-the-width-of-an-html-element-in-percent-with-jquery

Kalkman: EGreg: http://jsfiddle.net/850wzznt/

Eutsey: Hmm, you are right in crome.

Kalkman: If the width comes form a cl***, that property will be empty, but that’s fine too because once you restore node.style.width = ”; it will re-inherit widht: 100% form the cl***

Stinchfield: Btw folks, I have a question about lines 1 thru 7 of my fiddle – http://jsfiddle.net/dqggvjrj/2/ What was the reason for writing Cl***A.prototype.showFullname outside of function Cl***A { . }

Breheny: Kalkman: I guess I stand corrected

Bays: I was pretty sure it was coming back as a calculated Width

Kalkman: Zumba_addict: the code inside the function is “instance-specific” code