| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
| 6 | 6 |
| 7 part of $LIBRARYNAME; | 7 part of $LIBRARYNAME; |
| 8 | 8 |
| 9 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 9 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 10 $!MEMBERS | 10 $!MEMBERS |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 @Experimental() | 153 @Experimental() |
| 154 bool get isFullScreen => _webkitIsFullScreen; | 154 bool get isFullScreen => _webkitIsFullScreen; |
| 155 | 155 |
| 156 @DomName('Document.webkitPointerLockElement') | 156 @DomName('Document.webkitPointerLockElement') |
| 157 @SupportedBrowser(SupportedBrowser.CHROME) | 157 @SupportedBrowser(SupportedBrowser.CHROME) |
| 158 @SupportedBrowser(SupportedBrowser.SAFARI) | 158 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 159 @Experimental() | 159 @Experimental() |
| 160 Element get pointerLockElement => | 160 Element get pointerLockElement => |
| 161 _webkitPointerLockElement; | 161 _webkitPointerLockElement; |
| 162 | 162 |
| 163 @DomName('Document.webkitVisibilityState') | 163 @DomName('Document.visibilityState') |
| 164 @SupportedBrowser(SupportedBrowser.CHROME) | 164 @SupportedBrowser(SupportedBrowser.CHROME) |
| 165 @SupportedBrowser(SupportedBrowser.SAFARI) | 165 @SupportedBrowser(SupportedBrowser.FIREFOX) |
| 166 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 166 @Experimental() | 167 @Experimental() |
| 168 $if DART2JS |
| 169 String get visibilityState => JS('String', |
| 170 '(#.visibilityState || #.mozVisibilityState || #.msVisibilityState ||' |
| 171 '#.webkitVisibilityState)', this, this, this, this); |
| 172 $else |
| 167 String get visibilityState => _webkitVisibilityState; | 173 String get visibilityState => _webkitVisibilityState; |
| 174 $endif |
| 168 | 175 |
| 169 @Experimental | 176 @Experimental |
| 170 $if DART2JS | 177 $if DART2JS |
| 171 void register(String tag, Type customElementClass) { | 178 void register(String tag, Type customElementClass) { |
| 172 _registerCustomElement(JS('', 'window'), this, tag, customElementClass); | 179 _registerCustomElement(JS('', 'window'), this, tag, customElementClass); |
| 173 } | 180 } |
| 174 $else | 181 $else |
| 175 void register(String tag, Type custom) { | 182 void register(String tag, Type custom) { |
| 176 _Utils.register(tag, custom); | 183 _Utils.register(tag, custom); |
| 177 } | 184 } |
| 178 $endif | 185 $endif |
| 179 | 186 |
| 180 $if DART2JS | 187 $if DART2JS |
| 181 @Creates('Null') // Set from Dart code; does not instantiate a native type. | 188 @Creates('Null') // Set from Dart code; does not instantiate a native type. |
| 182 $endif | 189 $endif |
| 183 // Note: used to polyfill <template> | 190 // Note: used to polyfill <template> |
| 184 Document _templateContentsOwner; | 191 Document _templateContentsOwner; |
| 192 |
| 193 @DomName('Document.visibilityChange') |
| 194 @SupportedBrowser(SupportedBrowser.CHROME) |
| 195 @SupportedBrowser(SupportedBrowser.FIREFOX) |
| 196 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 197 @Experimental() |
| 198 static const EventStreamProvider<Event> visibilityChangeEvent = |
| 199 const _CustomEventStreamProvider<Event>( |
| 200 _determineVisibilityChangeEventType); |
| 201 |
| 202 static String _determineVisibilityChangeEventType(EventTarget e) { |
| 203 $if DART2JS |
| 204 if (JS('bool', '(typeof #.hidden !== "undefined")', e)) { |
| 205 // Opera 12.10 and Firefox 18 and later support |
| 206 return 'visibilitychange'; |
| 207 } else if (JS('bool', '(typeof #.mozHidden !== "undefined")', e)) { |
| 208 return 'mozvisibilitychange'; |
| 209 } else if (JS('bool', '(typeof #.msHidden !== "undefined")', e)) { |
| 210 return 'msvisibilitychange'; |
| 211 } else if (JS('bool', '(typeof #.webkitHidden !== "undefined")', e)) { |
| 212 return 'webkitvisibilitychange'; |
| 213 } |
| 214 return 'visibilitychange'; |
| 215 $else |
| 216 return 'webkitvisibilitychange'; |
| 217 $endif |
| 218 } |
| 219 |
| 220 @SupportedBrowser(SupportedBrowser.CHROME) |
| 221 @SupportedBrowser(SupportedBrowser.FIREFOX) |
| 222 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 223 @Experimental() |
| 224 Stream<Event> get onVisibilityChange => |
| 225 visibilityChangeEvent.forTarget(this); |
| 185 } | 226 } |
| OLD | NEW |