I am declaring a base \"Class\" for a Dijit Custom widget.
When in \'strict mode\'
routine this.inherited(arguments)
; is being called, I re
This issue was addressed in the Dojo framework as of v1.13.0.
Assuming you're using Dojo 1.13.0 or newer, to make a call to this.inherited
from a strict-mode file, simply pass a reference to the calling function (use a named function expression or NFE) as the first argument.
So your code above would look like this:
define([
'dojo/_base/declare',
'dojo/topic',
'dojo/_base/lang'
], function (
declare,
topic,
lang
) {
'use strict';
var attachTo = 'myPanels';
return declare(null, {
id: null,
title: null,
postCreate: function postCreate() { //(1) add function name
//(2) pass function reference as the first argument
this.inherited(postCreate, arguments);
this.placeAt(attachTo);
},
constructor: function () {
},
});
});
Note that named function expressions (NFEs) are very buggy in IE8 and earlier, so don't use this if you're supporting those browsers.