Commit 7b6d21ce authored by jansson@chromium.org's avatar jansson@chromium.org

Removed spaces, fixed local storage mechanism for first time visit.

Cleaned up a couple of spaces and also make sure the local storage
mechanism handles first time visits by checking for null instead of 'undefined'
since localStorage.getItem(key) returns null when it cannot find the key[1]. 

[1]http://www.w3.org/TR/webstorage/#dom-storage-getitem

BUG=NONE
TEST=Manual, setup P2P call
NOTRY=TRUE

Review URL: https://codereview.chromium.org/384353002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282939 0039d316-1c4b-4281-b951-d872f2087c98
parent 02210776
......@@ -81,11 +81,11 @@
<input class="width-100" type="text" id="pc-constraints" value="{}" ><br/>
PeerConnection <a href="http://goo.gl/xVi12">
createOffer MediaConstraints:</a><br/>
<input type="text" class="width-100" id="pc-createoffer-constraints"
<input type="text" class="width-100" id="pc-createoffer-constraints"
value="{}"/><br/>
PeerConnection <a href="http://goo.gl/0TjfX">
createAnswer MediaConstraints:</a><br/>
<input type="text" class="width-100" id="pc-createanswer-constraints"
<input type="text" class="width-100" id="pc-createanswer-constraints"
value="{}"/><br/>
Call:
......
......@@ -1062,11 +1062,12 @@ function registerLocalStorage_(element_id) {
'Element \"' + element.tagName + '\" is not an input element. ');
}
if (localStorage.getItem(element.id) == 'undefined') {
if (localStorage.getItem(element.id) == null) {
storeLocalStorageField_(element);
} else {
getLocalStorageField_(element);
}
// Registers the appropriate events for input elements.
if (element.type == 'checkbox') {
element.onclick = function() { storeLocalStorageField_(this); };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment