Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

Binding style attribute and Content Security Policy - best practice?

$
0
0

@jelhan wrote:

I'm wondering if there is any recommendation how to bind a style attributes? attributeBindings: ['style'] and <span style={{style}}> both require CSP policy stile-src: 'unsafe-inline'. On the other hand using jQuery .css() or manipulating CSS Object Model (CSSOM) directly doesn't feel like "the ember way" and will not work with fastboot.

There is an addon called ember-cli-csp-style which tries to help with a styleBindings property. It manipulates CSSOM directly in latest release. Current master seems to be broken and violations CSP.

I found nearly nothing about this topic even so dozens of ember-addons require stile-src: 'unsafe-inline'...

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles