Yes, any text within the <html> pair tags (public source code) will be read, no matter if it's hidden, in a header tag, CSS or in JS code. Google will follow and parse everything, as long as the file is public, which means only exception is server-side code (php for example).