OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // HTML5. So after we've fired an "error" event, if .preventDefault()
was | 65 // HTML5. So after we've fired an "error" event, if .preventDefault()
was |
66 // never called on the event, we fire an error event on the window (c
an't | 66 // never called on the event, we fire an error event on the window (c
an't |
67 // remember if this happens before or after we abort the transaction)
. | 67 // remember if this happens before or after we abort the transaction)
. |
68 // This is a separate event, which for example means that even if you | 68 // This is a separate event, which for example means that even if you |
69 // attach a capturing "error" handler on window, you won't see any ev
ents | 69 // attach a capturing "error" handler on window, you won't see any ev
ents |
70 // unless an error really went unhandled. And you also can't call | 70 // unless an error really went unhandled. And you also can't call |
71 // .preventDefault on the error event fired on the window in order to | 71 // .preventDefault on the error event fired on the window in order to |
72 // prevent the transaction from being aborted. It's purely there for | 72 // prevent the transaction from being aborted. It's purely there for |
73 // error reporting and distinctly different from the event propagatin
g to | 73 // error reporting and distinctly different from the event propagatin
g to |
74 // the window. | 74 // the window. |
75 // | 75 // |
76 // This is similar to how "error" events are handled in workers. | 76 // This is similar to how "error" events are handled in workers. |
77 // | 77 // |
78 // (I think that so far webkit hasn't implemented the window.onerror | 78 // (I think that so far webkit hasn't implemented the window.onerror |
79 // feature yet, so you probably don't want to fire the separate error | 79 // feature yet, so you probably don't want to fire the separate error |
80 // event on the window until that has been implemented)." -- Jonas Si
cking | 80 // event on the window until that has been implemented)." -- Jonas Si
cking |
81 | 81 |
82 doneDispatching: | 82 doneDispatching: |
83 event->setCurrentTarget(0); | 83 event->setCurrentTarget(0); |
84 event->setEventPhase(0); | 84 event->setEventPhase(0); |
85 return !event->defaultPrevented(); | 85 return !event->defaultPrevented(); |
86 } | 86 } |
87 | 87 |
88 } // namespace WebCore | 88 } // namespace WebCore |
OLD | NEW |