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

Inline Style Future Improvements #1

Open
bthallion opened this issue Sep 14, 2016 · 0 comments
Open

Inline Style Future Improvements #1

bthallion opened this issue Sep 14, 2016 · 0 comments

Comments

@bthallion
Copy link
Contributor

bthallion commented Sep 14, 2016

Right now we intercept mutations to an element's inline style by inserting an accessor style field directly on the element reference, so changes via element.style.x and $(element).css(s) are intercepted and logged.

To get a complete picture of how scripts may be mutating an inline style value we would have to intercept:
element.setAttribute
element.setAttributeNode

  • On the attribute node we would have to intercept nodeValue, textContent and value

element.removeAttribute
element.removeAttributeNode
element.style.setProperty
element.style.removeProperty

for example:

function setAttributeProxy(attribute, value) {
  if (atttribute === 'style') {
    queueAssignmentRecord(this, { styleInfo : value });
  }
  this._scSetAttribute(arguments);
}
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

1 participant