taint()

JavaScript1.1 Nav3 Syntax

taint(object)

Description

The taint() method was a security measure that was only implemented in JavaScript 1.1 and that allowed a developer to keep return values from being used by and propagated to other scripts. This method does not change the data element passed to it, but rather returns a marked reference to the element.

Because taint() and the functionality of data tainting was removed in JavaScript 1.2, you should avoid using this method. You should use it only if you have a specific security reason for compatibility with Navigator 3 browsers. See Chapter 1, "What Is JavaScript to a Programmer?" for more information on the security model that is now used in Navigator browsers.

Example

Listing ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.