When you define your anonymous function to handle the click event (button1.addEventListener('click', function(e) {...}), the value of object1.myMethod and object1.myprop are captured in the closure.
What it means is: you are defining a function, and this function, when executed, will need some values that are in scope when it was defined, but not when it will be executed (both object1.myMethod and object1.myprop). The function is being defined right there in your code, but is being passed around as a parameter and will be called far away from there, whenever the click event happen on the button.
What happens is that that object1.myMethod and object1.myprop are evaluated to its values and captured in the function's closure, to be available later when the function will be executed (you don't see any of this happening, it just happens).
So, your approach won't work here. I see one alternative for setting the property, that is pass the object in which you want to change the value, and pass the name of the property that you want to change.
// 1 way to make the property call work
object1 = {myProp:"value1"};
button1.addEventListener('click', function(e){
myFunction2(object1, 'myProp');
});
function myFunction2(src, prop) {
src[prop]="value3";
};
For the methods parts, I can see 3 ways to make it work (actually 4, if I've used apply instead of call).
First is the same as in the case of the property: you pass the object1 and the name of the slot where is the function.
Second, you can pass the object1 and the function, and later call your function in the context of object1.
Third, you can create, from your object1.myMethod, a new function that will be bound to object1 (that is, object1 will be its context), no matter where you will call it later. That is done with bind.
Examples:
// 3 ways to make the method call work
object1 = {myMethod:function(someParam){console.log(someParam)}};
button1.addEventListener('click', function(e){
myFunction1(object1, 'myMethod');
myFunction3(object1, object1.myMethod);
myFunction4(object1.myMethod.bind(object1, 'value3'));
});
function myFunction1(src, prop) {
src[prop]("value3");
};
function myFunction3(src, method) {
method.call(src, 'value3');
};
function myFunction4(func) {
func();
};