You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a way to wait an import being loaded using Promise.
This might be better to be a part of HTML standard, but it's fine to start from here.
Should promise-vending functions without arguments take onFulfilled & onRejected callbacks?
I don't like this. It's a needless inconsistency in the platform that sometimes you'll be interfacing with promise objects through the normal interface and sometimes you'll be bypassing that.
Title: [imports]: Want New LinkImport method to return a promise. (bugzilla: 25007)
Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007
comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007#c0
Morrita Hajime wrote on 2014-03-11 17:23:31 +0000.
There should be a way to wait an import being loaded using Promise.
This might be better to be a part of HTML standard, but it's fine to start from here.
comment: 1
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007#c1
Jake Archibald wrote on 2014-03-14 10:17:06 +0000.
Some details from the discussion at http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-March/042201.html
Should promise-vending functions without arguments take onFulfilled & onRejected callbacks?
Eg, it's currently:
var promise = link.loaded().then(onFulfilled, onRejected);
Should we allow:
var promise = link.loaded(onFulfilled, onRejected);
comment: 2
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007#c2
Domenic Denicola wrote on 2014-03-14 14:35:01 +0000.
I don't like this. It's a needless inconsistency in the platform that sometimes you'll be interfacing with promise objects through the normal interface and sometimes you'll be bypassing that.
comment: 3
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007#c3
Dimitri Glazkov wrote on 2014-04-30 19:16:54 +0000.
Maybe replace .import with this?
comment: 4
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007#c4
Jake Archibald wrote on 2014-05-01 08:00:22 +0000.
I'm hoping we can get .loaded() on other link types (CSS, rel=preload), see http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-March/042201.html
Not against .import() vending a promise though, especially if a general .loaded() method meets resistance or apathy.
comment: 5
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007#c5
Jake Archibald wrote on 2014-05-20 10:22:19 +0000.
In http://dev.w3.org/csswg/css-font-loading/#dom-fontface-loaded .loaded is a property, not a method.
link.loaded should be a property for consistency.
The text was updated successfully, but these errors were encountered: