2015-06-14 12:27:49 |
Sam Bull |
description |
"document.contents[foo] = bar" has no effect.
This results in needing to write the above code as:
var temp = document.contents
temp[foo] = bar
document.contents = temp
This is annoying and not nice code everytime I want to update a single value.
Proposed solution:
Allow saving keys directly.
If for some reason this is absolutely not possible, atleast throw an error or display or warning when an assignment is attempted, as it is clearly not the desired behaviour that the above line of code does absolutely nothing. |
"document.contents[foo] = bar" has no effect.
This results in needing to write the above code as:
var temp = document.contents
temp[foo] = bar
document.contents = temp
This is annoying and ugly code everytime I want to update a single value.
Proposed solution:
Allow saving keys directly.
If for some reason this is absolutely not possible, atleast throw an error or display a warning when an assignment is attempted, as it is clearly not the desired behaviour that the above line of code does absolutely nothing. |
|