Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write to readonly property #8

Closed
jylestrat opened this issue Jan 2, 2021 · 0 comments
Closed

Write to readonly property #8

jylestrat opened this issue Jan 2, 2021 · 0 comments

Comments

@jylestrat
Copy link

Hi,

I've found a problem when using json-view with Safari 10.0 on iPad (IOS 10.3)
You can't write directly on style property in createNodeElement() method.
It cause an "Attempted to assign to readonly property" error

I've solved the problem by replacing following line :
lineEl.style = 'margin-left: ' + node.depth * 18 + 'px;';
by
lineEl.setAttribute("style", 'margin-left: ' + node.depth * 18 + 'px;');

It work fine now on Opera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants