Q:

How to find style text that was previosly set on a feature - OL3

Using OL3, I set the text on a style dynamically:
var myLayer = new ol.layer. Vector({
            source: mySource,
            style: function (feature, resolution) {
                var style = new ol.style. Style({
                    text: new ol.style. Text({
                        text: setText(feature)
                    })
                });

                return [style];
            }
        });

I am trying to later read what is stored in text:
text: setText(feature)

I am trying to retrieve the text on a click event but not sure how to access that property under the feature style (feature is the variable from the event containing the clicked feature):
// Get current display text
var currentFeatureStyle = feature.getStyle();

But when I do that, I get a null currentFeatureStyle. 
Also tried looping through the feature:
for (var fid in feature)
{
//what to look for to extract the feature text? 

But not sure what to look for to extract the feature text.   Any help getting back the feature text from a feature would be appreciated. 
Thanks

A:

If someone can come up with a more correct answer please by all means post below.   I have created a "workaround" since I could not retrieve the text from the feature.   The workaround involves the following:

Inside the method the text is originally set, add the following:
function setText(feature)
{

    // First do your normal stuff (set the text of the feature)
    var output = "myFeatureText";

    // Here is the workaround step 1:
    // Create a property and set it to the text
    feature.displayText = output;

    // Return back value for the setting of the style text
    return output;
}

Now the text is also saved in a property called displayText.   Note: displayText is a made up property, it does not exist in openlayers. 

Step 2 is to retrieve the property you created in step 1 to get the display text.   In this example we are retrieving the feature from singleclick but it can be from anywhere else you are using the feature:
map.on('singleclick', function (evt) {

var feature = map.forEachFeatureAtPixel(evt.pixel,
                function (feature, layer) {
                    return feature;
                });

// Here is the workaround step 2:

// Get "display text" custom field for this feature

var displayText = feature.displayText;

. 

And thats all there is to it.   There must be a "correct" way to retrieve the text from the style of the feature but I am not aware of it.   If someone know how to by all means post your answer.