javascript - Chrome alarms don't work with variables? -


I'm making Chrome extensions for notifications using the Notification API and Alarm API. I have tested both of them and they work, but when I try to set the name of the alarm and this time comes from user input, then suddenly it does not work at all. Submit (work (e) {var $ request = $ ('# request'); var r = $ request.val () .split ('in'), name = r [0], zodiac = r [1] ; Console.log ('name:' + name + ', amount:' + zodiac); // WORKS / * * function * Chrome.alarms.create ('alarm_test', {delayInMinutes: 1}); * / / * Does not work * / chrome. Alarm.cent (name, {delay INMinutes: amount}); console.log ('alarm set.'); $ Request.val (''); return false;});

This is very strange thanks to any help :)

To fix this, all I had to do was to do this by using zodiac using the parseflot () method. it works now.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -