1// Copyright (c) 2013 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 5function setCursorToSelectValue() { 6 var selectEl = document.querySelector('select'); 7 var cursorType = parseInt(selectEl.value, 10); 8 common.naclModule.postMessage(cursorType); 9} 10 11function moduleDidLoad() { 12 setCursorToSelectValue(); 13} 14 15function attachListeners() { 16 var selectEl = document.querySelector('select'); 17 selectEl.addEventListener('change', function (e) { 18 setCursorToSelectValue(); 19 }); 20} 21