Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Watch HTML property without breaking functionality #47

Open
ldstein opened this issue Jun 13, 2013 · 1 comment
Open

Watch HTML property without breaking functionality #47

ldstein opened this issue Jun 13, 2013 · 1 comment

Comments

@ldstein
Copy link

ldstein commented Jun 13, 2013

Any possible solutions to maintain the setter functionality of standard HTML element properties while watching them with Watch JS?

Example:

var element = document.createElement('div');
element.id = 'myId'; // This will set HTML attribute to 'myId'
console.log('Element:',element); // HTML attribute has been assigned properly
WatchJS.watch(element, 'id', function(){console.log('Element ID changed')});
element.id = 'aNewId'; // This should set HTML attribute to 'aNewId'
console.log('Element:',element); // However, WatchJS has broken this functionality
@martinschaer
Copy link

+1. The same happens with inputs.

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

No branches or pull requests

2 participants