Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 cr.define('chrome.sync.user_events', function() { | |
| 6 function write() { | |
| 7 chrome.sync.writeUserEvent( | |
| 8 document.getElementById('event-time-usec-input').value, | |
|
Patrick Noland
2017/05/09 23:46:23
What happens if either of these fields has whitesp
skym
2017/05/10 00:06:46
"" => 0
" " => 0
" 123 " => 0
"12 3" => 0
"123" =>
| |
| 9 document.getElementById('navigation-id-input').value); | |
| 10 } | |
| 11 | |
| 12 function onLoad() { | |
| 13 $('create-event-button').addEventListener('click', write); | |
| 14 } | |
| 15 | |
| 16 return { | |
| 17 onLoad: onLoad | |
| 18 }; | |
| 19 }); | |
| 20 | |
| 21 document.addEventListener( | |
| 22 'DOMContentLoaded', | |
| 23 chrome.sync.user_events.onLoad, | |
| 24 false); | |
| 25 | |
| OLD | NEW |