Skip to content

Inline Style Future Improvements #1

@bthallion

Description

@bthallion

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions