hiimnalaa / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Add content directly if element is available (don't wait for DOM) #386

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use swfobject for your animated logo
2. Navigate to a page that is slow to load, ie. large in size
3. See how the logo takes "ages" to show up...

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

swfobject 2.2 - previous version of swfobject had this, actually

Please provide any additional information below.

I made such a change to implement this, in embedSWF():

<pre>

var loadElement = function() { ....... }

if(document.getElementById(replaceElemIdStr)){
    loadElement();
} else {
    addDomLoadEvent(loadElement);
}

</pre>

What do you think? Isn't it limiting to have to wait for DOM when all you
need from the DOM is one element, and thus enabling developers an alternative?

Also, thanks for swfobject. It really helps cutting page sizes (by removing
lots of object/embed markup)

Original issue reported on code.google.com by borne...@gmail.com on 12 Oct 2009 at 6:18

GoogleCodeExporter commented 9 years ago
This is a great idea, on large pages the delay is significant while waiting for 
the
dom to load, you then see the flash elements pop in one by one at the end... 
not very
pretty. 

Original comment by kayge...@gmail.com on 20 Oct 2009 at 7:48

GoogleCodeExporter commented 9 years ago
This is a valid suggestion, but may I point out that this is already achievable 
with
the current SWFObject API using createSWF. I do understand it isn't very 
convenient,
though.

I'm changing the issue type from 'defect' to 'enhancement'.

Original comment by platelu...@gmail.com on 13 Jan 2010 at 4:14

GoogleCodeExporter commented 9 years ago

Original comment by platelu...@gmail.com on 13 Jan 2010 at 4:39

GoogleCodeExporter commented 9 years ago
Any idea if 2.3 will be released, and when?  Getting tired to keep a fork just 
for this.

Original comment by bosko.mi...@gmail.com on 7 Jan 2011 at 7:44

GoogleCodeExporter commented 9 years ago
SWFObject 2.3 will not contain this enhancement; 2.3 will focus strictly on bug 
fixes. Unfortunately I don't have a timeline for release.

As I mentioned previously, you can achieve your desired functionality via the 
swfobject.createSWF() method, so swfobject already provides you the tools you 
need.

Original comment by platelu...@gmail.com on 18 May 2011 at 6:32