Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Creating a resizable panel using an HTML code fragment starting …
…with a comment will break As mentioned in adobe#6252, the original error msg isn't really helpful. The modified msg could be improved as well, though: Since the content of the panel may be a **HTML fragment** (usually starting with a DIV node), mentioning that ```the **first** (root) DOM node must have an ID that will be used as a pref key``` would help. Nevertheless, the mangled code in WorkspaceManager.js isn't reliable since it will _break_ when the panel content **starts with a html comment**. Such a comment may be necessary when a plugin like HTMLhint is used. On a "panel" code fragment, this plugin attests an error due to a missing doctype. To disable this error, one may put a comment at the top of the html code: ```<!--htmlhint doctype-first: false-->```. WorkspaceManager.js will fail creating the panel, then. The proposed modification fixes such an issue. **sample test code for a resizable panel** ``` <!--htmlhint doctype-first: false--> <!--This comment is of no use but for testing purpose--> <div id="my-very-special-testing-panel"><span style="color: red">Elvis</span> was here!</div> ```
- Loading branch information