| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 return node; | 950 return node; |
| 951 } | 951 } |
| 952 | 952 |
| 953 /** | 953 /** |
| 954 * @param {!Event} event | 954 * @param {!Event} event |
| 955 * @return {boolean} | 955 * @return {boolean} |
| 956 */ | 956 */ |
| 957 function isEnterKey(event) | 957 function isEnterKey(event) |
| 958 { | 958 { |
| 959 // Check if in IME. | 959 // Check if in IME. |
| 960 return event.keyCode !== 229 && event.keyIdentifier === "Enter"; | 960 return event.keyCode !== 229 && event.key === "Enter"; |
| 961 } | 961 } |
| 962 | 962 |
| 963 /** | 963 /** |
| 964 * @param {!Event} event | 964 * @param {!Event} event |
| 965 * @return {boolean} | 965 * @return {boolean} |
| 966 */ | 966 */ |
| 967 function isEscKey(event) | 967 function isEscKey(event) |
| 968 { | 968 { |
| 969 return event.keyCode === 27; | 969 return event.keyCode === 27; |
| 970 } | 970 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 987 { | 987 { |
| 988 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 988 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
| 989 callback(); | 989 callback(); |
| 990 } | 990 } |
| 991 | 991 |
| 992 if (document.readyState === "complete" || document.readyState === "interacti
ve") | 992 if (document.readyState === "complete" || document.readyState === "interacti
ve") |
| 993 callback(); | 993 callback(); |
| 994 else | 994 else |
| 995 window.addEventListener("DOMContentLoaded", windowLoaded, false); | 995 window.addEventListener("DOMContentLoaded", windowLoaded, false); |
| 996 } | 996 } |
| OLD | NEW |