4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-Img'>/**
19 </span> * @class Ext.Img
20 * @extends Ext.Component
22 * Simple helper class for easily creating image components. This simply renders an image tag to the DOM
23 * with the configured src.
25 * {@img Ext.Img/Ext.Img.png Ext.Img component}
29 * var changingImage = Ext.create('Ext.Img', {
30 * src: 'http://www.sencha.com/img/20110215-feat-html5.png',
31 * renderTo: Ext.getBody()
34 * // change the src of the image programmatically
35 * changingImage.setSrc('http://www.sencha.com/img/20110215-feat-perf.png');
37 Ext.define('Ext.Img', {
38 extend: 'Ext.Component',
39 alias: ['widget.image', 'widget.imagecomponent'],
40 <span id='Ext-Img-cfg-src'> /** @cfg {String} src The image src */
43 getElConfig: function() {
50 // null out this function, we can't set any html inside the image
51 initRenderTpl: Ext.emptyFn,
53 <span id='Ext-Img-method-setSrc'> /**
54 </span> * Updates the {@link #src} of the image
56 setSrc: function(src) {