[whatwg] prefilling select

Ian Hickson ian at hixie.ch
Sun Aug 22 04:20:18 PDT 2004


On Mon, 2 Aug 2004, [ISO-8859-1] Olav Junker Kjær wrote:
> 
> I understand that when a selected element with a data attribute is 
> parsed, the data document should be immediately fetched, and the 
> select-element is prefilled before the parser continues.

No; while the data load can be immediatly started, the data will not be 
inserted into the document until the data has been obtained, and in the 
meantime the rest of the page can continue loading.


> "If a select element has its data attribute manipulated via the DOM, then that
> should immediately begin the prefilling process too. However, any currently
> executing script must be guaranteed to run to completion before the changes
> required by the process take effect."
> 
> So in this case, the data document(s) are loaded asynchronously, and several
> data requests might be running at the same time, though the resulting
> documents should be processed in the same order they were initiated.
> 
> Why the difference in these two cases?

There is no difference, at least not intentionally. What makes you think 
the first case is synchronous?


> Another question: isn't it a bit confusing to use a property to load 
> data into the control, when the effect of loading (may be) cumulative? 
> Usually attributes setting is idempotent. Maybe it would be more natural 
> to use a method called loadData(uri) or something like that.

We could do... What would setting the data attribute do? Nothing?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list