Why document can be used freely in antd components

1. This document is neither a parameter to a method nor a member variable. Even if you look at the parent class. Why can I use it directly here?

clipboard.png

Jul.11,2022

antd components are also encapsulated in js and run on browsers. Of course, js objects or browser objects can be used


Why can't browsers use document ?


has nothing to do with antd. React code will eventually be executed in the browser. Of course, there are document objects in the browser


document is the api provided by the browser, as long as you run under the browser, you can use it.
just like you can use alert, alert is a method in the window object, and window is provided by the browser.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e667e5-45bba.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e667e5-45bba.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?