From e7d70ad57746bb3416c0801901d5e0a17fbad5f9 Mon Sep 17 00:00:00 2001
From: Philip Chimento
+The {{TextEncoder}} interface converts a string to UTF-8 encoded bytes. +This is a purely computational interface, +generally useful as a JavaScript language facility, +so it should be exposed everywhere. +
+ ++localStorage affects the state of the user agent, so it should not be exposed everywhere. +
+ ++Technically, {{console}} could affect the state of the user agent +(by causing log messages to appear in the developer tools) +or the user’s device +(by writing to a log file.) +But these things are not observable from the running code, +and the practicality of having {{console}} everywhere outweighs the disadvantages. +
+ +Additionally, anything annotated with {{SecureContext}}, +or relying on an event loop, +should not be exposed everywhere. +Not all global scopes are secure contexts +or have an event loop. + ++The {{AbortSignal/timeout(milliseconds)|timeout}} method of {{AbortSignal}} +relies on an event loop +and should not be exposed everywhere. +The rest of {{AbortSignal}} is purely computational, +and should be exposed everywhere. +
+ +The {{Exposed|[Exposed=*]}} annotation should also be applied conservatively. +If a feature is not that useful +without other features that are not exposed everywhere, +default to not exposing that feature as well. + ++The {{Blob}} interface is purely computational, +but {{Blob}} objects are primarily used for, or obtained as a result of, I/O. +By the principle of exposing conservatively, +Blob should not be exposed everywhere. +
+