You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

webkit-assign-loader

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

webkit-assign-loader

Webpack loader for webkit-assign to handle WebKit issue #138038


Version published
Maintainers
1
Created

Readme

Source

webkit-assign-loader

Due to [WebKit issue #138038][], assigning to a property on an object created with Object.create may result in the error TypeError: Attempted to assign to readonly property.. This bug is known to affect iOS 8 users and is particularly likely to happen in recent versions of [Angular.js][] (at least version 1.4.2).

This utility rewrites the following code

object.$$a = 5;

to this

var __webkitAssign__$$a = '$$a';
object[__webkitAssign__$$a] = 5;

as a workaround to prevent a TypeError.

(Copied from https://github.com/StoryCloud/webkit-assign/blob/master/README.md)

Usage

npm i -D webkit-assign-loader

// webpackConfig.js (an excerpt)

{
  module: {
    loaders: [
      {
        test: /angular\.js$/,
        loader: 'webkit-assign-loader'
      }
    ]
  }
}

Keywords

FAQs

Package last updated on 21 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc