Just as an input, Web IDL supports "namespace", which is different from a namespace-ish object.
Example) https://drafts.csswg.org/cssom/#the-css.escape()-method CSS namespace appears as "window.CSS" in JavaScript. "window.navigator" is a (singleton) instance of Navigator interface (hence the object can be stateful) and not a namespace (which is stateless). It's a convention that Web IDL namespace's name starts with an uppercase (window.CSS) while Web IDL attribute's name starts with a lowercase (window.navigator). Web IDL namespaces are exposed on global objects (like "window.CSS"). Cheers, Yuki Shiino 2021年8月24日(火) 15:40 'Thomas Steiner' via blink-dev <blink-dev@chromium.org>: > As the co-author of the article about the feature > <https://web.dev/handwriting-recognition/> I find the namespaced variant > more logical and more in-line with how other APIs work, for example, > Geolocation <https://developer.mozilla.org/en-US/docs/Web/API/Geolocation>. > (Not a big argument: It also allows for better minification.) > > On Tue, Aug 24, 2021 at 6:44 AM Jiewei Qian <q...@chromium.org> wrote: > >> Hi blink-dev, >> >> We are designing a new API for handwriting recognition, and want to know >> if we should put methods behind a namespace. >> >> We have two methods: >> >> - navigator.queryHandwritingRecognizerSupport >> - navigator.createHandwritingRecognizer >> >> We anticipate most websites will call the first method (to decide if the >> handwriting recognition support meets their needs), before calling the >> second (to make use of the feature). >> >> We want to know if it's more preferable to put them behind a namespace, >> for example: >> >> - navigator.handwriting.queryRecognizerSupport >> - navigator.handwriting.createRecognizer >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "blink-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to blink-dev+unsubscr...@chromium.org. >> To view this discussion on the web visit >> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CANFkJJ%3DdX_DHHo2fSNJPL1DT5zGnuQYKGfjeHekrbcRE4E%2Bo6w%40mail.gmail.com >> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CANFkJJ%3DdX_DHHo2fSNJPL1DT5zGnuQYKGfjeHekrbcRE4E%2Bo6w%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Thomas Steiner, PhD—Developer Advocate (https://blog.tomayac.com, > https://twitter.com/tomayac) > > Google Germany GmbH, ABC-Str. 19, 20354 Hamburg, Germany > Geschäftsführer: Paul Manicle, Halimah DeLaine Prado > Registergericht und -nummer: Hamburg, HRB 86891 > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.1.23 (GNU/Linux) > > > iFy0uwAntT0bE3xtRa5AfeCheCkthAtTh3reSabiGbl0ck0fjumBl3DCharaCTersAttH3b0ttom. > hTtPs://xKcd.cOm/1181/ > -----END PGP SIGNATURE----- > > -- > You received this message because you are subscribed to the Google Groups > "blink-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to blink-dev+unsubscr...@chromium.org. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALgRrLm16Bhv88nz4Yts999890b4kbDdKmGJVcJxCiSVYtY%3DsQ%40mail.gmail.com > <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALgRrLm16Bhv88nz4Yts999890b4kbDdKmGJVcJxCiSVYtY%3DsQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAN0uC_S901%2BzrvHC_wuQKqMSmvcC%3DSX9xijweyr8X_NhW%2BJj-g%40mail.gmail.com.