1- /*jslint white: true nomen: true plusplus: true */
1+ /*jslint white: true, nomen: true, plusplus: true */
22/*global mx, mxui, mendix, dojo, require, console, define, module */
33
44require ( [
55 'dojo/_base/declare' , 'mxui/widget/_WidgetBase' ,
6- 'mxui/dom' , 'dojo/query' , 'dojo/dom-prop' , 'dojo/dom-style' ,
7- 'dojo/dom-attr'
8- ] , function ( declare , _WidgetBase , dom , domQuery , domProp , domStyle , domAttr ) {
6+ 'mxui/dom' , 'dojo/dom-style' , 'dojo/dom-attr' , 'dojo/html'
7+ ] , function ( declare , _WidgetBase , dom , domStyle , domAttr , html ) {
98
109 'use strict' ;
1110
1211 // Declare widget.
1312 return declare ( 'HTMLSnippet.widget.HTMLSnippet' , [ _WidgetBase ] , {
1413
14+ constructor : function ( ) {
15+ } ,
16+
1517 // dijit._WidgetBase.postCreate is called after constructing the widget. Implement to do extra setup work.
1618 postCreate : function ( ) {
1719 console . log ( this . id + '.postCreate' ) ;
@@ -25,13 +27,13 @@ require([
2527 } ) ;
2628
2729 domAttr . set ( this . domNode , 'style' , this . style ) ; //might override height and width
28- this . domNode . innerHTML = this . contents ;
30+ html . set ( this . domNode , this . contents ) ;
2931 break ;
3032 case 'js' :
3133 try {
3234 eval ( this . contents ) ;
3335 } catch ( e ) {
34- dojo . html . set ( this . domNode , "Error while evaluating JavaScript: " + e ) ;
36+ html . set ( this . domNode , "Error while evaluating JavaScript: " + e ) ;
3537 }
3638 break ;
3739 }
0 commit comments