Search the Community
Showing results for tags 'properties'.
-
Hello & Thanks , Seems to me that I once saw a chart of Html elements showing the allowable properties and values and inheritances of each element . Anyone know where this is located ? Ugh ! I forgot to bookmark it . Thanks
- 3 replies
-
- html
- properties
-
(and 1 more)
Tagged with:
-
I have this code: if(active[active.id].group.propertyIsEnumerable(selection)) { alert(selection) active[active.id].group[selection] = null; } That is looking for a particular property (selection) and is supposed to remove it from the object. In this case setting it to null, I thought, would remove the specific property so it would no longer be defined and therefore not be enumerable. But it does not seem to, as demonstrated by var test for(var x in active[active.id].group) { test += "n"+x; // new line in DOM browsers } alert(test) // The selection property continues to be listed. Am I doing something wrong, or is there another way to remove the property altogether? I have nit picked through the exact string construction for any differences and have not found any and, in fact the alert in the first code snip does show up, so I know that selection is a valid property. Thanks for time and attention
-
I am trying to create my own Image( ); Object. This is how the build in Image function works: var img = new Image(); // Create new img element img.src = 'myImage.png'; // Set source path ctx.drawImage(img,0,0) is going to draw the image loaded from the img.src property. But I don't understand why.. Why am I not required to type: ctx.drawImage(img.src,0,0) ?? In fact, that breaks the script. Saying Type Error Please help me out here, I want to create my own "new Image()" with custom properties and methods..
- 3 replies
-
- javascript
- object
-
(and 3 more)
Tagged with: