Browse Source

Add a comment about why we are using realize immediately

Steven Silvester 8 years ago
parent
commit
be4f26e92f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/common/dialog.ts

+ 4 - 0
src/common/dialog.ts

@@ -540,6 +540,10 @@ namespace Dialog {
      */
     createButtonNode(button: IButton): HTMLElement {
       let className = this.createItemClass(button);
+      // We use realize here instead of creating
+      // nodes with document.createElement as a
+      // shorthand, and only because this is not
+      // called often.
       return VirtualDOM.realize(
         h.button({ className },
               this.renderIcon(button),