aredridel/html5 — pull request #106 by coderaiser (2014-03-18 08:50:45+00:00)
Title: fix addAttributesToElement in SAXTreeBuilder

Element.attributes could be `undefined`. And it is `undfined` when I'm editing html-document in [ace](http://github.com/ajax.org/ace) with [html-worker](https://github.com/ajaxorg/ace-builds/blob/fc9d2cae9fe8e6e95e74c86a31d21caadd8f9f39/src-noconflict/worker-html.js#L7637) which is use `html5`.

There is error log:
```
Worker TypeError: Cannot read property 'length' of undefined
at getAttribute (http://io.cloudcmd.io/lib/client/edit/worker-html.js:7638:37)
at SAXTreeBuilder.addAttributesToElement (http://io.cloudcmd.io/lib/client/edit/worker-html.js:7649:12)
at Object.TreeBuilder.modes.base.startTagHtml (http://io.cloudcmd.io/lib/client/edit/worker-html.js:4361:9)
at Object.TreeBuilder.modes.base.processStartTag (http://io.cloudcmd.io/lib/client/edit/worker-html.js:4340:40)
at SAXTreeBuilder.TreeBuilder.processToken (http://io.cloudcmd.io/lib/client/edit/worker-html.js:6791:17)
at Tokenizer._emitToken (http://io.cloudcmd.io/lib/client/edit/worker-html.js:2727:21)
at Tokenizer._emitCurrentToken (http://io.cloudcmd.io/lib/client/edit/worker-html.js:2735:7)
at Tokenizer.after_attribute_value_state (http://io.cloudcmd.io/lib/client/edit/worker-html.js:3608:14)
at Tokenizer.tokenize (http://io.cloudcmd.io/lib/client/edit/worker-html.js:2764:21)
at SAXParser.parse (http://io.cloudcmd.io/lib/client/edit/worker-html.js:7516:18)
```

You could check this if try to edit first line of [index.html in editor](http://io.cloudcmd.io/fs/home/io/cloudcmd/html/fs#/edit/index.html) of [my project](http://cloudcmd.io).

I'm using `Chrome Version 33.0.1750.154 m`