Wrapper around get_property to get a function object, needed by the onunload handler.