Skip to content

Conversation

@joshualitt
Copy link
Contributor

@joshualitt joshualitt commented May 19, 2023

Fixes #47

@joshualitt
Copy link
Contributor Author

@srujzs @sigmundch ptal. I'm not sure if we really want to expose the webkit properties in this manner. I'm happy to hide those if we don't think they are useful.

@kevmoo
Copy link
Member

kevmoo commented May 19, 2023

Cool!

I'd probably default to dropping the browser-specific ones. Unless we get individual requests.

@joshualitt
Copy link
Contributor Author

Cool!

I'd probably default to dropping the browser-specific ones. Unless we get individual requests.

done.

final array = objectEntries(await promiseToFuture<JSObject>(css.listAll()));
for (var i = 0; i < array.length.toDart; i++) {
final entry = array[i.toJS] as JSArray;
final data = entry[1.toJS] as JSObject;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessarily actionable right now: all these index accesses feel very cumbersome, I think we will want to continue iterating on how to improve the experience here.

My default at the moment would be to create a proxy to wrap the array, use regular iteration, and use a Dart int indices.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, we definitely want to do something better here.

As you suggest, for places where performance isn't a concern, then an adapter class seems like a good choice.

We can provide such helper adapters, perhaps we can even avoid reifying the adapters on JS backends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add helpers for common css properties

3 participants