First of all, W3Schools has nothing to do with W3. Their textbooks were pretty terrible before people started complaining, and their confused name implies that they are somehow related to W3, but this is not really the case.
Secondly, this method is no longer needed. There are no browsers available that do not support JS purely ( links , lynx , etc. Do not have problems with JS code at all).
It is assumed that the code should do this:
source share