Answered by:
What exactly is the new (in RP) "strict processing"?

Question
-
I noticed that in RP now we have WinJS.strictProcessing().
I see the documentation says...
Turns on strict declarative processing. Strict declarative processing is performed by WinJS.UI.processAll or WinJS.Binding.processAll. When strict processing is turned on, all the functions that are used within a declarative context must be marked with a property supportedForProcessing with a value of true.
Can someone tell me what the benefit of this is? I can just turn off strictProcessing and then continue to call functions from my declaration, but what am I gaining by turning on strictProcessing and then setting my functions to supportForProcessing = true?
Wednesday, June 6, 2012 8:58 PM
Answers
-
The purpose of this is to plug a security vulnerability because code specified in markup can be executed during the processAll methods. I discuss this in Chapter 4 of Programming Windows 8 Apps with HTML, CSS, and JavaScript--see Free ebook: Programming Windows 8 Apps with HTML, CSS, and JavaScript (First Preview) for download details (it's free).
- Edited by Kraig Brockschmidt [MSFT]Microsoft employee Thursday, June 7, 2012 6:59 AM Corrected link
- Marked as answer by codefosterMicrosoft employee Thursday, June 7, 2012 3:21 PM
Thursday, June 7, 2012 3:59 AM
All replies
-
There is a very real chance that strictProcessing mode will be mandatory for WinJS apps at RTM. Your best bet is to activate strict processing now and make the requisite changes to your functions.
Wednesday, June 6, 2012 9:11 PM -
That's very helpful. It would still be nice to know what exactly it is for, but I can live with "just do it". :)
Thanks, Bryan.
Thursday, June 7, 2012 2:59 AM -
The purpose of this is to plug a security vulnerability because code specified in markup can be executed during the processAll methods. I discuss this in Chapter 4 of Programming Windows 8 Apps with HTML, CSS, and JavaScript--see Free ebook: Programming Windows 8 Apps with HTML, CSS, and JavaScript (First Preview) for download details (it's free).
- Edited by Kraig Brockschmidt [MSFT]Microsoft employee Thursday, June 7, 2012 6:59 AM Corrected link
- Marked as answer by codefosterMicrosoft employee Thursday, June 7, 2012 3:21 PM
Thursday, June 7, 2012 3:59 AM -
Kraig, your URL is wrong (guess the forum software screwed it up). The correct one is:
http://blogs.msdn.com/b/microsoft_press/archive/2012/06/04/free-ebook-programming-windows-8-apps-with-html-css-and-javascript-first-preview.aspx
Thursday, June 7, 2012 5:11 AM -
Thanks. I corrected the link in my post above.Thursday, June 7, 2012 7:00 AM
-
Thanks!Thursday, June 7, 2012 3:21 PM