lib/jscrewit.js
function (environment, engineFeatureObjs)
        {
            var resultMask = maskNew();
            var thisMask = this.mask;
            var attributeCache = createEmpty();
            ELEMENTARY.forEach
            (
                function (featureObj)
                {
                    var otherMask = featureObj.mask;
                    var included = maskIncludes(thisMask, otherMask);
                    if (included)
                    {
                        var attributeValue = featureObj.attributes[environment];
                        if
                        (
                            attributeValue === undefined ||
                            engineFeatureObjs !== undefined &&
                            !isExcludingAttribute(attributeCache, attributeValue, engineFeatureObjs)
                        )
                            resultMask = maskUnion(resultMask, otherMask);
                    }
                }
            );
            var result = featureFromMask(resultMask);
            return result;
        }
function (environment, engineFeatureObjs)
        {
            var resultMask = maskNew();
            var thisMask = this.mask;
            var attributeCache = createEmpty();
            ELEMENTARY.forEach
            (
                function (featureObj)
                {
                    var otherMask = featureObj.mask;
                    var included = maskIncludes(thisMask, otherMask);
                    if (included)
                    {
                        var attributeValue = featureObj.attributes[environment];
                        if
                        (
                            attributeValue === undefined ||
                            engineFeatureObjs !== undefined &&
                            !isExcludingAttribute(attributeCache, attributeValue, engineFeatureObjs)
                        )
                            resultMask = maskUnion(resultMask, otherMask);
                    }
                }
            );
            var result = featureFromMask(resultMask);
            return result;
        }
function ( environment , engineFeatureObjs ) { var resultMask = maskNew ( ) ; var thisMask = this . mask ; var attributeCache = createEmpty ( ) ; ELEMENTARY . forEach ( function ( featureObj ) { var otherMask = featureObj . mask ; var included = maskIncludes ( thisMask , otherMask ) ; if ( included ) { var attributeValue = featureObj . attributes [ environment ] ; if ( attributeValue === undefined || engineFeatureObjs !== undefined && ! isExcludingAttribute ( attributeCache , attributeValue , engineFeatureObjs ) ) resultMask = maskUnion ( resultMask , otherMask ) ; } } ) ; var result = featureFromMask ( resultMask ) ; return result ; }
Creates a new feature object from this feature by removing elementary features that are
not available inside a particular environment.

This method is useful to selectively exclude features that are available inside a web
worker.

@function JScrewIt.Feature#restrict

@param {string} environment
The environment to which this feature should be restricted.
Two environments are currently supported.

<dl>

<dt><code>"forced-strict-mode"</code></dt>
<dd>
Removes features that are not available in environments that require strict mode
code.</dd>

<dt><code>"web-worker"</code></dt>
<dd>Removes features that are not available inside web workers.</dd>

</dl>

@param {JScrewIt.Feature[]} [engineFeatureObjs]
An array of predefined feature objects, each corresponding to a particular engine in
which the restriction should be enacted.
If this parameter is omitted, the restriction is enacted in all engines.

@returns {JScrewIt.Feature}
A feature object.
Creates a new feature object from this feature by removing elementary features that are not available inside a particular environment .