Hacker News new | past | comments | ask | show | jobs | submit login

I guess you can use the word "native" to mean whatever you want, but I assure that (as a former Mozilla developer) if you claim "Firefox uses native controls" (because internally it calls into platform APIs for some rendering sometimes), people are going to get mad at you.



Yup, I know both you a Patrick work(ed) on this stuff, hence why I will from this point on stop claiming things about Firefox as I have not done more than glance at the file you linked. However, as someone who is fairly familiar with WebKit and even worked on it for a short period, and as someone who happens to be a person who gets mad at others at claiming that they are designing “native” UIs: I think calling what Safari does as “native” is a better description than saying it is not. (To give you an idea of where I tend to draw the line: Flutter is not native. Qt is not native. React Native uses native controls, as does wxWidgets.) I think of you asked a random software engineer how they thought web controls were implemented they’d guess that they were drawn and implemented from scratch in the browser, and some browsers (like Chrome) actually do this. What Safari does isn’t drawing a rectangle on a screen using Quartz: it’s actually pulling the class that defines the UI of a button from Cocoa and putting it on the screen, making sure it stays consistent with the DOM. There are actual AppKit engineers working on this and they call these native controls. Safari sometimes needs to disable or patch around bugs in them. It’s basically as close as you could possibly get while still being able to use one of these in a webpage.

Edit: as I mentioned in another comment, what I’ve really been trying to say isn’t that they’re as native as the web will let them be, and that happens to allow them to use a fair bit of platform-specific code if they would like. I think the things you are trying to bring up are just a consequence of the web not being a native platform.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: