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

Side by Side Diff: pkg/polymer/lib/src/build/linter.dart

Issue 114473002: fix linter on svg (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 /** 5 /**
6 * Logic to validate that developers are correctly using Polymer constructs. 6 * Logic to validate that developers are correctly using Polymer constructs.
7 * This is mainly used to produce warnings for feedback in the editor. 7 * This is mainly used to produce warnings for feedback in the editor.
8 */ 8 */
9 library polymer.src.build.linter; 9 library polymer.src.build.linter;
10 10
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 } 389 }
390 390
391 /** 391 /**
392 * Produces warnings for misuses of on-foo event handlers, and for instanting 392 * Produces warnings for misuses of on-foo event handlers, and for instanting
393 * custom tags incorrectly. 393 * custom tags incorrectly.
394 */ 394 */
395 void _validateNormalElement(Element node) { 395 void _validateNormalElement(Element node) {
396 // Event handlers only allowed inside polymer-elements 396 // Event handlers only allowed inside polymer-elements
397 node.attributes.forEach((name, value) { 397 node.attributes.forEach((name, value) {
398 if (name.startsWith('on')) { 398 if (name is String && name.startsWith('on')) {
399 _validateEventHandler(node, name, value); 399 _validateEventHandler(node, name, value);
400 } 400 }
401 }); 401 });
402 402
403 // Validate uses of custom-tags 403 // Validate uses of custom-tags
404 var nodeTag = node.tagName; 404 var nodeTag = node.tagName;
405 var hasIsAttribute; 405 var hasIsAttribute;
406 var customTagName; 406 var customTagName;
407 if (_isCustomTag(nodeTag)) { 407 if (_isCustomTag(nodeTag)) {
408 // <fancy-button> 408 // <fancy-button>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 'Make sure the script tag is placed after all HTML imports.'; 529 'Make sure the script tag is placed after all HTML imports.';
530 530
531 const String BOOT_JS_DEPRECATED = 531 const String BOOT_JS_DEPRECATED =
532 '"boot.js" is now deprecated. Instead, you can initialize your polymer ' 532 '"boot.js" is now deprecated. Instead, you can initialize your polymer '
533 'application by calling "initPolymer()" in your main. If you don\'t have a ' 533 'application by calling "initPolymer()" in your main. If you don\'t have a '
534 'main, then you can include our generic main by adding the following ' 534 'main, then you can include our generic main by adding the following '
535 'script tag to your page: \'<script type="application/dart">export ' 535 'script tag to your page: \'<script type="application/dart">export '
536 '"package:polymer/init.dart";</script>\'. Additionally you need to ' 536 '"package:polymer/init.dart";</script>\'. Additionally you need to '
537 'include: \'<script src="packages/browser/dart.js"></script>\' in the page ' 537 'include: \'<script src="packages/browser/dart.js"></script>\' in the page '
538 'too. Make sure these script tags come after all HTML imports.'; 538 'too. Make sure these script tags come after all HTML imports.';
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698