LoginSignup
1
0

More than 5 years have passed since last update.

WinJS.Namespace に 関数を登録するときのトラップ - Metro App (javascript)

Last updated at Posted at 2012-07-06

WinJS.Namespace.define() には関数も登録できるけれども、exception が発生してしまう。

エラーメッセージ

WinJS.Utilities.requireSupportedForProcessing: Value is not supported within a declarative processing context, if you want it to be supported mark it using WinJS.Utilities.markSupportedForProcessing.

親切にも WinJS.Utilities.markSupportedForProcessing を使うようヒントをくれているので、素直に従いましょう~

サンプル

example.js
WinJS.Utilities.markSupportedForProcessing(onItemClicked);
WinJS.Namespace.define('SampleData', {onItemClicked: onItemClicked});

APIリファレンス

WinJS.Utilities.markSupportedForProcessing function

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0