Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: pkg/polymer/lib/src/declaration.dart

Issue 225043004: Replace bootstrap logic with 'boot.js', use 'component/dart' mime-type and add (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of polymer; 5 part of polymer;
6 6
7 /// *Warning* this class is experimental and subject to change. 7 /// *Warning* this class is experimental and subject to change.
8 /// 8 ///
9 /// The data associated with a polymer-element declaration, if it is backed 9 /// The data associated with a polymer-element declaration, if it is backed
10 /// by a Dart class instead of a JavaScript prototype. 10 /// by a Dart class instead of a JavaScript prototype.
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 const _STYLE_GLOBAL_SCOPE = 'global'; 441 const _STYLE_GLOBAL_SCOPE = 'global';
442 const _SCOPE_ATTR = 'polymer-scope'; 442 const _SCOPE_ATTR = 'polymer-scope';
443 const _STYLE_SCOPE_ATTRIBUTE = 'element'; 443 const _STYLE_SCOPE_ATTRIBUTE = 'element';
444 const _STYLE_CONTROLLER_SCOPE = 'controller'; 444 const _STYLE_CONTROLLER_SCOPE = 'controller';
445 445
446 String _cssTextFromSheet(LinkElement sheet) { 446 String _cssTextFromSheet(LinkElement sheet) {
447 if (sheet == null) return ''; 447 if (sheet == null) return '';
448 448
449 // In deploy mode we should never do a sync XHR; link rel=stylesheet will 449 // In deploy mode we should never do a sync XHR; link rel=stylesheet will
450 // be inlined into a <style> tag by ImportInliner. 450 // be inlined into a <style> tag by ImportInliner.
451 if (loader.deployMode) return ''; 451 if (_deployMode) return '';
452 452
453 // TODO(jmesserly): sometimes the href property is wrong after deployment. 453 // TODO(jmesserly): sometimes the href property is wrong after deployment.
454 var href = sheet.href; 454 var href = sheet.href;
455 if (href == '') href = sheet.attributes["href"]; 455 if (href == '') href = sheet.attributes["href"];
456 456
457 // TODO(jmesserly): it seems like polymer-js is always polyfilling 457 // TODO(jmesserly): it seems like polymer-js is always polyfilling
458 // HTMLImports, because their code depends on "__resource" to work, so I 458 // HTMLImports, because their code depends on "__resource" to work, so I
459 // don't see how it can work with native HTML Imports. We use a sync-XHR 459 // don't see how it can work with native HTML Imports. We use a sync-XHR
460 // under the assumption that the file is likely to have been already 460 // under the assumption that the file is likely to have been already
461 // downloaded and cached by HTML Imports. 461 // downloaded and cached by HTML Imports.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 // Dart note: we need this function because we have additional renames JS does 522 // Dart note: we need this function because we have additional renames JS does
523 // not have. The JS renames are simply case differences, whereas we have ones 523 // not have. The JS renames are simply case differences, whereas we have ones
524 // like doubleclick -> dblclick and stripping the webkit prefix. 524 // like doubleclick -> dblclick and stripping the webkit prefix.
525 String _eventNameFromType(String eventType) { 525 String _eventNameFromType(String eventType) {
526 final result = _reverseEventTranslations[eventType]; 526 final result = _reverseEventTranslations[eventType];
527 return result != null ? result : eventType; 527 return result != null ? result : eventType;
528 } 528 }
529 529
530 final _ATTRIBUTES_REGEX = new RegExp(r'\s|,'); 530 final _ATTRIBUTES_REGEX = new RegExp(r'\s|,');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698