From 01cb691e8a619fcb4c6e1e67980ae10fe04b364e Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 7 Dec 2011 13:26:48 +1000 Subject: Move snippets to separate test in the examples testcase This test filters out warning messages, so as to not clutter the logs. Also altered an example so that v8 doesn't spit out a warning message. Change-Id: I89ab9f1c12bee6cea88e06ce5bf98f2f69a13559 Reviewed-by: Aaron Kennedy --- doc/src/snippets/declarative/codingconventions/myscript.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/src/snippets/declarative') diff --git a/doc/src/snippets/declarative/codingconventions/myscript.js b/doc/src/snippets/declarative/codingconventions/myscript.js index cfa646250b..e7f83c259c 100644 --- a/doc/src/snippets/declarative/codingconventions/myscript.js +++ b/doc/src/snippets/declarative/codingconventions/myscript.js @@ -1,5 +1,8 @@ function calculateWidth(parent) { + if (parent == null) + return 0 + var w = parent.width / 3 // ... // more javascript code -- cgit v1.2.3